Mu42
2fe288fd29
emit the suspicious_auto_trait_impls for negative impls as well
2023-03-06 20:04:33 +08:00
bors
0978711950
Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, r=compiler-errors,davidtwco,estebank,oli-obk
...
diagnostics: if AssocFn has self argument, describe as method
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515
This commit also changes the tooltips on rustdoc intra-doc links targeting methods.
For anyone not sure why this is being done, see the Reference definitions of these terms in <https://doc.rust-lang.org/1.67.1/reference/items/associated-items.html#methods >
> Associated functions whose first parameter is named `self` are called methods and may be invoked using the [method call operator](https://doc.rust-lang.org/1.67.1/reference/expressions/method-call-expr.html ), for example, `x.foo()`, as well as the usual function call notation.
In particular, while this means it's technically correct for rustc to refer to a method as an associated function (and there are a few cases where it'll still do so), rustc *must never* use the term "method" to refer to an associated function that does not have a `self` parameter.
2023-02-23 00:19:12 +00:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Michael Howell
3d056c3125
diagnostics: if AssocFn has self argument, describe as method
...
Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515
This commit also changes the tooltips on rustdoc intra-doc links
targeting methods.
2023-02-22 08:40:33 -07:00
Camille GILLOT
065f0b222d
Move query out of path.
2023-02-14 20:27:38 +00:00
Camille GILLOT
40cb4d1bc7
Even less HIR.
2023-02-14 20:27:38 +00:00
Alan Egerton
dea342d861
Make visiting traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
ba55a453eb
Alias folding/visiting traits instead of re-export
2023-02-13 10:24:46 +00:00
David Tolnay
4501d3abe1
Autotrait bounds on dyn-safe trait methods
2023-02-03 08:33:40 -08:00
David Tolnay
9e1c600f74
Disallow impl autotrait for trait object
2023-02-03 08:33:40 -08:00
bors
56ee85274e
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
...
Remove some `ref` patterns from the compiler
Previous PR: https://github.com/rust-lang/rust/pull/105368
r? `@Nilstrieb`
2023-01-20 04:52:28 +00:00
Scott McMurray
925dc37313
Stop using BREAK & CONTINUE in compiler
...
Switching them to `Break(())` and `Continue(())` instead.
libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17 23:17:51 -08:00
Maybe Waffle
09485eaae1
rustc_hir_analysis: remove ref patterns
2023-01-17 07:48:19 +00:00
Kyle Matsuda
6e969ea85e
fix various subst_identity vs skip_binder
2023-01-14 00:30:03 -07:00
Kyle Matsuda
f29a334c90
change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14 00:29:56 -07:00
Kyle Matsuda
be130b57d4
change usages of impl_trait_ref to bound_impl_trait_ref
2023-01-14 00:23:32 -07:00
Troy Neubauer
4cb9030a66
Implement fix for #67535
2023-01-01 18:26:28 -08:00
Oli Scherer
a9af75cdbc
Give opaque types a better coherence error
2022-12-21 17:44:30 +00:00
Maybe Waffle
da40965300
Add Mutability::{is_mut,is_not}
2022-11-23 20:26:31 +00:00
Oli Scherer
2752e328c9
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases
2022-11-21 16:00:31 +00:00
Matthias Krüger
61c6cdb5f4
Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnr
...
Improve use of ErrorGuaranteed and code cleanup
Part of #103874
2022-11-04 06:40:32 +01:00
yukang
ab22f5521b
change error_reported to use Result instead of an option
2022-11-03 04:57:44 +08:00
Nicholas Nethercote
c8c25ce5a1
Rename some OwnerId fields.
...
spastorino noticed some silly expressions like `item_id.def_id.def_id`.
This commit renames several `def_id: OwnerId` fields as `owner_id`, so
those expressions become `item_id.owner_id.def_id`.
`item_id.owner_id.local_def_id` would be even clearer, but the use of
`def_id` for values of type `LocalDefId` is *very* widespread, so I left
that alone.
2022-10-29 20:28:38 +11:00
Maybe Waffle
a8f7e244b7
Refactor rustc lint API
2022-10-01 10:03:06 +00:00
lcnr
1fc86a63f4
rustc_typeck to rustc_hir_analysis
2022-09-27 10:37:23 +02:00