mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Mark method receivers in builtin derives as being from the derive.
This commit is contained in:
@@ -1052,7 +1052,7 @@ fn create_method(
|
||||
|
||||
let args = {
|
||||
let self_arg = explicit_self.map(|explicit_self| {
|
||||
let ident = Ident::with_dummy_span(kw::SelfLower).with_span_pos(span);
|
||||
let ident = Ident::new(kw::SelfLower, span);
|
||||
ast::Param::from_self(ast::AttrVec::default(), explicit_self, ident)
|
||||
});
|
||||
let nonself_args =
|
||||
|
||||
@@ -315,7 +315,7 @@ pub fn expr_ident(&self, span: Span, id: Ident) -> Box<ast::Expr> {
|
||||
self.expr_path(self.path_ident(span, id))
|
||||
}
|
||||
pub fn expr_self(&self, span: Span) -> Box<ast::Expr> {
|
||||
self.expr_ident(span, Ident::with_dummy_span(kw::SelfLower))
|
||||
self.expr_ident(span, Ident::new(kw::SelfLower, span))
|
||||
}
|
||||
|
||||
pub fn expr_macro_call(&self, span: Span, call: Box<ast::MacCall>) -> Box<ast::Expr> {
|
||||
|
||||
@@ -272,6 +272,7 @@ LL | impl<T: NotNull> IntoNullable for T {
|
||||
| ------- ^^^^^^^^^^^^ ^
|
||||
| |
|
||||
| unsatisfied trait bound introduced here
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
|
||||
--> $DIR/issue-38821.rs:23:23
|
||||
@@ -301,6 +302,7 @@ LL | impl<T: NotNull> IntoNullable for T {
|
||||
| ------- ^^^^^^^^^^^^ ^
|
||||
| |
|
||||
| unsatisfied trait bound introduced here
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
|
||||
--> $DIR/issue-38821.rs:23:10
|
||||
|
||||
Reference in New Issue
Block a user