Mark method receivers in builtin derives as being from the derive.

This commit is contained in:
Jason Newcomb
2026-04-05 14:26:40 -04:00
parent 9602bda1dd
commit 5394268ca3
3 changed files with 4 additions and 2 deletions
@@ -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 =
+1 -1
View File
@@ -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