rust/compiler/rustc_passes/src
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
..
liveness Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
check_attr.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
check_const.rs session: diagnostic migration lint on more fns 2023-01-30 17:11:35 +00:00
dead.rs Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, r=compiler-errors,davidtwco,estebank,oli-obk 2023-02-23 00:19:12 +00:00
debugger_visualizer.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
diagnostic_items.rs if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
entry.rs Move compiler input and ouput paths into session 2023-01-16 14:46:44 +00:00
errors.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
hir_id_validator.rs Improve pretty-printing of HirIdValidator errors 2023-02-01 20:09:22 +01:00
hir_stats.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
lang_items.rs Remove HirId -> LocalDefId map from HIR. 2023-01-28 09:55:26 +00:00
layout_test.rs remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata 2023-02-16 17:05:56 -07:00
lib_features.rs ast: Optimize list and value extraction primitives for attributes 2023-02-01 22:35:02 +04:00
lib.rs errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
liveness.rs Add of_trait to DefKind::Impl. 2023-02-14 19:55:44 +00:00
loops.rs Specify that break cannot be used outside of loop *or* labeled block 2022-11-05 01:12:58 +00:00
naked_functions.rs migrate naked_functions.rs to translateable diagnostics 2022-10-07 13:19:27 -06:00
reachable.rs Do not fetch HIR for reachable. 2023-02-14 20:26:01 +00:00
stability.rs diagnostics: if AssocFn has self argument, describe as method 2023-02-22 08:40:33 -07:00
upvars.rs rustc_hir: Relax lifetime requirements on Visitor::visit_path 2022-12-01 17:04:02 +03:00
weak_lang_items.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00