summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-16 07:20:52 +0000
committerbors <bors@rust-lang.org>2020-01-16 07:20:52 +0000
commit9fe05e9456b84996637c2f29b35c37960e537540 (patch)
tree63b90b70dd13343e901b28e5f857ac404d8b32fa
parentAuto merge of #67339 - CAD97:rc-provenance, r=sfackler (diff)
parentRollup merge of #68266 - Stromberg90:patch-2, r=Dylan-DPC (diff)
downloadrust-9fe05e9456b84996637c2f29b35c37960e537540.tar.gz
rust-9fe05e9456b84996637c2f29b35c37960e537540.tar.bz2
rust-9fe05e9456b84996637c2f29b35c37960e537540.tar.xz
Auto merge of #68272 - Dylan-DPC:rollup-vrb90gu, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #67780 (Move some queries from rustc::ty to librustc_ty.) - #68096 (Clean up some diagnostics by making them more consistent) - #68223 (Use 3.6 instead of 3.5 in float fract() documentation) - #68265 (Fix some issue numbers of unstable features) - #68266 (Changed docs for f32 and f64.) Failed merges: - #68204 (Use named fields for `{ast,hir}::ItemKind::Impl`) r? @ghost
-rw-r--r--Cargo.lock12
-rw-r--r--src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md4
-rw-r--r--src/doc/unstable-book/src/language-features/member-constraints.md4
-rw-r--r--src/doc/unstable-book/src/language-features/repr128.md4
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/librustc/middle/lang_items.rs6
-rw-r--r--src/librustc/traits/error_reporting.rs2
-rw-r--r--src/librustc/ty/mod.rs356
-rw-r--r--src/librustc_ast_passes/feature_gate.rs2
-rw-r--r--src/librustc_builtin_macros/test.rs2
-rw-r--r--src/librustc_feature/active.rs4
-rw-r--r--src/librustc_interface/Cargo.toml1
-rw-r--r--src/librustc_interface/passes.rs1
-rw-r--r--src/librustc_lint/builtin.rs23
-rw-r--r--src/librustc_mir/borrow_check/nll.rs4
-rw-r--r--src/librustc_parse/parser/attr.rs4
-rw-r--r--src/librustc_parse/parser/pat.rs4
-rw-r--r--src/librustc_passes/diagnostic_items.rs2
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs8
-rw-r--r--src/librustc_resolve/lib.rs2
-rw-r--r--src/librustc_ty/Cargo.toml16
-rw-r--r--src/librustc_ty/lib.rs25
-rw-r--r--src/librustc_ty/ty.rs369
-rw-r--r--src/librustc_typeck/check/cast.rs2
-rw-r--r--src/librustc_typeck/check/method/suggest.rs2
-rw-r--r--src/librustc_typeck/check/mod.rs2
-rw-r--r--src/libstd/f32.rs12
-rw-r--r--src/libstd/f64.rs12
-rw-r--r--src/libstd/panicking.rs2
-rw-r--r--src/test/compile-fail/panic-handler-twice.rs2
-rw-r--r--src/test/run-make-fulldeps/libtest-json/output-default.json2
-rw-r--r--src/test/run-make-fulldeps/libtest-json/output-stdout-success.json2
-rw-r--r--src/test/rustdoc-ui/failed-doctest-output.stdout2
-rw-r--r--src/test/ui/anon-params-deprecated.stderr6
-rw-r--r--src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr4
-rw-r--r--src/test/ui/async-await/recursive-async-impl-trait-type.stderr2
-rw-r--r--src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr4
-rw-r--r--src/test/ui/consts/miri_unleashed/mutable_const2.stderr2
-rw-r--r--src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr2
-rw-r--r--src/test/ui/deprecation/deprecated-macro_escape-inner.rs2
-rw-r--r--src/test/ui/deprecation/deprecated-macro_escape-inner.stderr4
-rw-r--r--src/test/ui/deprecation/deprecated-macro_escape.rs8
-rw-r--r--src/test/ui/deprecation/deprecated-macro_escape.stderr2
-rw-r--r--src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr24
-rw-r--r--src/test/ui/duplicate_entry_error.rs2
-rw-r--r--src/test/ui/duplicate_entry_error.stderr4
-rw-r--r--src/test/ui/error-codes/E0152.stderr4
-rw-r--r--src/test/ui/error-codes/E0658.stderr2
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs4
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr6
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs2
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr4
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs6
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr6
-rw-r--r--src/test/ui/feature-gates/feature-gate-never_type.stderr10
-rw-r--r--src/test/ui/feature-gates/feature-gate-repr128.stderr2
-rw-r--r--src/test/ui/future-incompatible-lint-group.stderr2
-rw-r--r--src/test/ui/imports/extern-crate-self/extern-crate-self-fail.rs2
-rw-r--r--src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr2
-rw-r--r--src/test/ui/issues/issue-29124.stderr4
-rw-r--r--src/test/ui/issues/issue-45730.stderr6
-rw-r--r--src/test/ui/issues/issue-57362-1.stderr2
-rw-r--r--src/test/ui/keyword/keyword-super-as-identifier.rs2
-rw-r--r--src/test/ui/keyword/keyword-super-as-identifier.stderr4
-rw-r--r--src/test/ui/keyword/keyword-super.rs2
-rw-r--r--src/test/ui/keyword/keyword-super.stderr4
-rw-r--r--src/test/ui/lint/uninitialized-zeroed.stderr70
-rw-r--r--src/test/ui/malformed/malformed-interpolated.stderr2
-rw-r--r--src/test/ui/module-macro_use-arguments.rs2
-rw-r--r--src/test/ui/module-macro_use-arguments.stderr2
-rw-r--r--src/test/ui/multi-panic.rs2
-rw-r--r--src/test/ui/nll/closure-requirements/escape-argument-callee.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/escape-argument.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr6
-rw-r--r--src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr8
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr4
-rw-r--r--src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr16
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr16
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr20
-rw-r--r--src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr20
-rw-r--r--src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr32
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr8
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr4
-rw-r--r--src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr16
-rw-r--r--src/test/ui/order-dependent-cast-inference.stderr2
-rw-r--r--src/test/ui/panic-handler/panic-handler-duplicate.rs2
-rw-r--r--src/test/ui/panic-handler/panic-handler-duplicate.stderr4
-rw-r--r--src/test/ui/panic-handler/panic-handler-std.rs2
-rw-r--r--src/test/ui/panic-handler/panic-handler-std.stderr4
-rw-r--r--src/test/ui/pattern/const-pat-ice.stderr2
-rw-r--r--src/test/ui/resolve/impl-items-vis-unresolved.rs3
-rw-r--r--src/test/ui/resolve/impl-items-vis-unresolved.stderr4
-rw-r--r--src/test/ui/suffixed-literal-meta.stderr48
-rw-r--r--src/test/ui/super-at-top-level.rs2
-rw-r--r--src/test/ui/super-at-top-level.stderr4
-rw-r--r--src/test/ui/test-attrs/test-should-panic-attr.stderr8
-rw-r--r--src/test/ui/test-panic-abort.run.stdout2
-rw-r--r--src/test/ui/traits/trait-bounds-same-crate-name.rs2
-rw-r--r--src/test/ui/traits/trait-bounds-same-crate-name.stderr4
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-static-call-wrong-trait.stderr2
110 files changed, 742 insertions, 668 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 3359fe4..f33d7ff 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3652,6 +3652,7 @@ dependencies = [
3652 "rustc_span", 3652 "rustc_span",
3653 "rustc_target", 3653 "rustc_target",
3654 "rustc_traits", 3654 "rustc_traits",
3655 "rustc_ty",
3655 "rustc_typeck", 3656 "rustc_typeck",
3656 "serialize", 3657 "serialize",
3657 "smallvec 1.0.0", 3658 "smallvec 1.0.0",
@@ -3954,6 +3955,17 @@ dependencies = [
3954] 3955]
3955 3956
3956[[package]] 3957[[package]]
3958name = "rustc_ty"
3959version = "0.0.0"
3960dependencies = [
3961 "log",
3962 "rustc",
3963 "rustc_data_structures",
3964 "rustc_hir",
3965 "rustc_span",
3966]
3967
3968[[package]]
3957name = "rustc_typeck" 3969name = "rustc_typeck"
3958version = "0.0.0" 3970version = "0.0.0"
3959dependencies = [ 3971dependencies = [
diff --git a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md b/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md
index 6187f39..53e0109 100644
--- a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md
+++ b/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md
@@ -1,8 +1,8 @@
1# `infer_static_outlives_requirements` 1# `infer_static_outlives_requirements`
2 2
3The tracking issue for this feature is: [#44493] 3The tracking issue for this feature is: [#54185]
4 4
5[#44493]: https://github.com/rust-lang/rust/issues/44493 5[#54185]: https://github.com/rust-lang/rust/issues/54185
6 6
7------------------------ 7------------------------
8The `infer_static_outlives_requirements` feature indicates that certain 8The `infer_static_outlives_requirements` feature indicates that certain
diff --git a/src/doc/unstable-book/src/language-features/member-constraints.md b/src/doc/unstable-book/src/language-features/member-constraints.md
index 0d11c31..3ba4a3e 100644
--- a/src/doc/unstable-book/src/language-features/member-constraints.md
+++ b/src/doc/unstable-book/src/language-features/member-constraints.md
@@ -1,8 +1,8 @@
1# `member_constraints` 1# `member_constraints`
2 2
3The tracking issue for this feature is: [#61977] 3The tracking issue for this feature is: [#61997]
4 4
5[#61977]: https://github.com/rust-lang/rust/issues/61977 5[#61997]: https://github.com/rust-lang/rust/issues/61997
6 6
7------------------------ 7------------------------
8 8
diff --git a/src/doc/unstable-book/src/language-features/repr128.md b/src/doc/unstable-book/src/language-features/repr128.md
index 0858988..146f50e 100644
--- a/src/doc/unstable-book/src/language-features/repr128.md
+++ b/src/doc/unstable-book/src/language-features/repr128.md
@@ -1,8 +1,8 @@
1# `repr128` 1# `repr128`
2 2
3The tracking issue for this feature is: [#35118] 3The tracking issue for this feature is: [#56071]
4 4
5[#35118]: https://github.com/rust-lang/rust/issues/35118 5[#56071]: https://github.com/rust-lang/rust/issues/56071
6 6
7------------------------ 7------------------------
8 8
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 95ffe4f..15720dd 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -44,7 +44,7 @@
44// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do 44// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do
45// this, both the generated test artifact and the linked libtest (which 45// this, both the generated test artifact and the linked libtest (which
46// transitively includes libcore) will both define the same set of lang items, 46// transitively includes libcore) will both define the same set of lang items,
47// and this will cause the E0152 "duplicate lang item found" error. See 47// and this will cause the E0152 "found duplicate lang item" error. See
48// discussion in #50466 for details. 48// discussion in #50466 for details.
49// 49//
50// This cfg won't affect doc tests. 50// This cfg won't affect doc tests.
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs
index 42fc3e0..643359f 100644
--- a/src/librustc/middle/lang_items.rs
+++ b/src/librustc/middle/lang_items.rs
@@ -184,7 +184,7 @@ impl LanguageItemCollector<'tcx> {
184 self.tcx.sess, 184 self.tcx.sess,
185 span, 185 span,
186 E0152, 186 E0152,
187 "duplicate lang item found: `{}`.", 187 "found duplicate lang item `{}`",
188 name 188 name
189 ), 189 ),
190 None => { 190 None => {
@@ -206,12 +206,12 @@ impl LanguageItemCollector<'tcx> {
206 }, 206 },
207 }; 207 };
208 if let Some(span) = self.tcx.hir().span_if_local(original_def_id) { 208 if let Some(span) = self.tcx.hir().span_if_local(original_def_id) {
209 err.span_note(span, "first defined here."); 209 err.span_note(span, "first defined here");
210 } else { 210 } else {
211 match self.tcx.extern_crate(original_def_id) { 211 match self.tcx.extern_crate(original_def_id) {
212 Some(ExternCrate {dependency_of, ..}) => { 212 Some(ExternCrate {dependency_of, ..}) => {
213 err.note(&format!( 213 err.note(&format!(
214 "first defined in crate `{}` (which `{}` depends on).", 214 "first defined in crate `{}` (which `{}` depends on)",
215 self.tcx.crate_name(original_def_id.krate), 215 self.tcx.crate_name(original_def_id.krate),
216 self.tcx.crate_name(*dependency_of))); 216 self.tcx.crate_name(*dependency_of)));
217 }, 217 },
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index c1df114..7f151af 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -1156,7 +1156,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1156 err.span_help(impl_span, "trait impl with same name found"); 1156 err.span_help(impl_span, "trait impl with same name found");
1157 let trait_crate = self.tcx.crate_name(trait_with_same_path.krate); 1157 let trait_crate = self.tcx.crate_name(trait_with_same_path.krate);
1158 let crate_msg = format!( 1158 let crate_msg = format!(
1159 "Perhaps two different versions of crate `{}` are being used?", 1159 "perhaps two different versions of crate `{}` are being used?",
1160 trait_crate 1160 trait_crate
1161 ); 1161 );
1162 err.note(&crate_msg); 1162 err.note(&crate_msg);
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index d1e37a4..e6acb6b 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -18,7 +18,6 @@ use crate::middle::resolve_lifetime::ObjectLifetimeDefault;
18use crate::mir::interpret::ErrorHandled; 18use crate::mir::interpret::ErrorHandled;
19use crate::mir::GeneratorLayout; 19use crate::mir::GeneratorLayout;
20use crate::mir::ReadOnlyBodyAndCache; 20use crate::mir::ReadOnlyBodyAndCache;
21use crate::session::CrateDisambiguator;
22use crate::session::DataTypeKind; 21use crate::session::DataTypeKind;
23use crate::traits::{self, Reveal}; 22use crate::traits::{self, Reveal};
24use crate::ty; 23use crate::ty;
@@ -31,7 +30,6 @@ use rustc_data_structures::captures::Captures;
31use rustc_data_structures::fx::FxHashMap; 30use rustc_data_structures::fx::FxHashMap;
32use rustc_data_structures::fx::FxIndexMap; 31use rustc_data_structures::fx::FxIndexMap;
33use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; 32use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
34use rustc_data_structures::svh::Svh;
35use rustc_data_structures::sync::{self, par_iter, Lrc, ParallelIterator}; 33use rustc_data_structures::sync::{self, par_iter, Lrc, ParallelIterator};
36use rustc_hir as hir; 34use rustc_hir as hir;
37use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res}; 35use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
@@ -2423,70 +2421,6 @@ impl<'tcx> AdtDef {
2423 pub fn sized_constraint(&self, tcx: TyCtxt<'tcx>) -> &'tcx [Ty<'tcx>] { 2421 pub fn sized_constraint(&self, tcx: TyCtxt<'tcx>) -> &'tcx [Ty<'tcx>] {
2424 tcx.adt_sized_constraint(self.did).0 2422 tcx.adt_sized_constraint(self.did).0
2425 } 2423 }
2426
2427 fn sized_constraint_for_ty(&self, tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Vec<Ty<'tcx>> {
2428 let result = match ty.kind {
2429 Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
2430 | FnPtr(_) | Array(..) | Closure(..) | Generator(..) | Never => vec![],
2431
2432 Str | Dynamic(..) | Slice(_) | Foreign(..) | Error | GeneratorWitness(..) => {
2433 // these are never sized - return the target type
2434 vec![ty]
2435 }
2436
2437 Tuple(ref tys) => match tys.last() {
2438 None => vec![],
2439 Some(ty) => self.sized_constraint_for_ty(tcx, ty.expect_ty()),
2440 },
2441
2442 Adt(adt, substs) => {
2443 // recursive case
2444 let adt_tys = adt.sized_constraint(tcx);
2445 debug!("sized_constraint_for_ty({:?}) intermediate = {:?}", ty, adt_tys);
2446 adt_tys
2447 .iter()
2448 .map(|ty| ty.subst(tcx, substs))
2449 .flat_map(|ty| self.sized_constraint_for_ty(tcx, ty))
2450 .collect()
2451 }
2452
2453 Projection(..) | Opaque(..) => {
2454 // must calculate explicitly.
2455 // FIXME: consider special-casing always-Sized projections
2456 vec![ty]
2457 }
2458
2459 UnnormalizedProjection(..) => bug!("only used with chalk-engine"),
2460
2461 Param(..) => {
2462 // perf hack: if there is a `T: Sized` bound, then
2463 // we know that `T` is Sized and do not need to check
2464 // it on the impl.
2465
2466 let sized_trait = match tcx.lang_items().sized_trait() {
2467 Some(x) => x,
2468 _ => return vec![ty],
2469 };
2470 let sized_predicate = Binder::dummy(TraitRef {
2471 def_id: sized_trait,
2472 substs: tcx.mk_substs_trait(ty, &[]),
2473 })
2474 .to_predicate();
2475 let predicates = tcx.predicates_of(self.did).predicates;
2476 if predicates.iter().any(|(p, _)| *p == sized_predicate) {
2477 vec![]
2478 } else {
2479 vec![ty]
2480 }
2481 }
2482
2483 Placeholder(..) | Bound(..) | Infer(..) => {
2484 bug!("unexpected type `{:?}` in sized_constraint_for_ty", ty)
2485 }
2486 };
2487 debug!("sized_constraint_for_ty({:?}) = {:?}", ty, result);
2488 result
2489 }
2490} 2424}
2491 2425
2492impl<'tcx> FieldDef { 2426impl<'tcx> FieldDef {
@@ -2742,57 +2676,6 @@ impl<'tcx> TyCtxt<'tcx> {
2742 is_associated_item.then(|| self.associated_item(def_id)) 2676 is_associated_item.then(|| self.associated_item(def_id))
2743 } 2677 }
2744 2678
2745 fn associated_item_from_trait_item_ref(
2746 self,
2747 parent_def_id: DefId,
2748 parent_vis: &hir::Visibility<'_>,
2749 trait_item_ref: &hir::TraitItemRef,
2750 ) -> AssocItem {
2751 let def_id = self.hir().local_def_id(trait_item_ref.id.hir_id);
2752 let (kind, has_self) = match trait_item_ref.kind {
2753 hir::AssocItemKind::Const => (ty::AssocKind::Const, false),
2754 hir::AssocItemKind::Method { has_self } => (ty::AssocKind::Method, has_self),
2755 hir::AssocItemKind::Type => (ty::AssocKind::Type, false),
2756 hir::AssocItemKind::OpaqueTy => bug!("only impls can have opaque types"),
2757 };
2758
2759 AssocItem {
2760 ident: trait_item_ref.ident,
2761 kind,
2762 // Visibility of trait items is inherited from their traits.
2763 vis: Visibility::from_hir(parent_vis, trait_item_ref.id.hir_id, self),
2764 defaultness: trait_item_ref.defaultness,
2765 def_id,
2766 container: TraitContainer(parent_def_id),
2767 method_has_self_argument: has_self,
2768 }
2769 }
2770
2771 fn associated_item_from_impl_item_ref(
2772 self,
2773 parent_def_id: DefId,
2774 impl_item_ref: &hir::ImplItemRef<'_>,
2775 ) -> AssocItem {
2776 let def_id = self.hir().local_def_id(impl_item_ref.id.hir_id);
2777 let (kind, has_self) = match impl_item_ref.kind {
2778 hir::AssocItemKind::Const => (ty::AssocKind::Const, false),
2779 hir::AssocItemKind::Method { has_self } => (ty::AssocKind::Method, has_self),
2780 hir::AssocItemKind::Type => (ty::AssocKind::Type, false),
2781 hir::AssocItemKind::OpaqueTy => (ty::AssocKind::OpaqueTy, false),
2782 };
2783
2784 AssocItem {
2785 ident: impl_item_ref.ident,
2786 kind,
2787 // Visibility of trait impl items doesn't matter.
2788 vis: ty::Visibility::from_hir(&impl_item_ref.vis, impl_item_ref.id.hir_id, self),
2789 defaultness: impl_item_ref.defaultness,
2790 def_id,
2791 container: ImplContainer(parent_def_id),
2792 method_has_self_argument: has_self,
2793 }
2794 }
2795
2796 pub fn field_index(self, hir_id: hir::HirId, tables: &TypeckTables<'_>) -> usize { 2679 pub fn field_index(self, hir_id: hir::HirId, tables: &TypeckTables<'_>) -> usize {
2797 tables.field_indices().get(hir_id).cloned().expect("no index for a field") 2680 tables.field_indices().get(hir_id).cloned().expect("no index for a field")
2798 } 2681 }
@@ -3070,105 +2953,9 @@ impl Iterator for AssocItemsIterator<'_> {
3070 } 2953 }
3071} 2954}
3072 2955
3073fn associated_item(tcx: TyCtxt<'_>, def_id: DefId) -> AssocItem {
3074 let id = tcx.hir().as_local_hir_id(def_id).unwrap();
3075 let parent_id = tcx.hir().get_parent_item(id);
3076 let parent_def_id = tcx.hir().local_def_id(parent_id);
3077 let parent_item = tcx.hir().expect_item(parent_id);
3078 match parent_item.kind {
3079 hir::ItemKind::Impl(.., ref impl_item_refs) => {
3080 if let Some(impl_item_ref) = impl_item_refs.iter().find(|i| i.id.hir_id == id) {
3081 let assoc_item =
3082 tcx.associated_item_from_impl_item_ref(parent_def_id, impl_item_ref);
3083 debug_assert_eq!(assoc_item.def_id, def_id);
3084 return assoc_item;
3085 }
3086 }
3087
3088 hir::ItemKind::Trait(.., ref trait_item_refs) => {
3089 if let Some(trait_item_ref) = trait_item_refs.iter().find(|i| i.id.hir_id == id) {
3090 let assoc_item = tcx.associated_item_from_trait_item_ref(
3091 parent_def_id,
3092 &parent_item.vis,
3093 trait_item_ref,
3094 );
3095 debug_assert_eq!(assoc_item.def_id, def_id);
3096 return assoc_item;
3097 }
3098 }
3099
3100 _ => {}
3101 }
3102
3103 span_bug!(
3104 parent_item.span,
3105 "unexpected parent of trait or impl item or item not found: {:?}",
3106 parent_item.kind
3107 )
3108}
3109
3110#[derive(Clone, HashStable)] 2956#[derive(Clone, HashStable)]
3111pub struct AdtSizedConstraint<'tcx>(pub &'tcx [Ty<'tcx>]); 2957pub struct AdtSizedConstraint<'tcx>(pub &'tcx [Ty<'tcx>]);
3112 2958
3113/// Calculates the `Sized` constraint.
3114///
3115/// In fact, there are only a few options for the types in the constraint:
3116/// - an obviously-unsized type
3117/// - a type parameter or projection whose Sizedness can't be known
3118/// - a tuple of type parameters or projections, if there are multiple
3119/// such.
3120/// - a Error, if a type contained itself. The representability
3121/// check should catch this case.
3122fn adt_sized_constraint(tcx: TyCtxt<'_>, def_id: DefId) -> AdtSizedConstraint<'_> {
3123 let def = tcx.adt_def(def_id);
3124
3125 let result = tcx.mk_type_list(
3126 def.variants
3127 .iter()
3128 .flat_map(|v| v.fields.last())
3129 .flat_map(|f| def.sized_constraint_for_ty(tcx, tcx.type_of(f.did))),
3130 );
3131
3132 debug!("adt_sized_constraint: {:?} => {:?}", def, result);
3133
3134 AdtSizedConstraint(result)
3135}
3136
3137fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: DefId) -> &[DefId] {
3138 let id = tcx.hir().as_local_hir_id(def_id).unwrap();
3139 let item = tcx.hir().expect_item(id);
3140 match item.kind {
3141 hir::ItemKind::Trait(.., ref trait_item_refs) => tcx.arena.alloc_from_iter(
3142 trait_item_refs
3143 .iter()
3144 .map(|trait_item_ref| trait_item_ref.id)
3145 .map(|id| tcx.hir().local_def_id(id.hir_id)),
3146 ),
3147 hir::ItemKind::Impl(.., ref impl_item_refs) => tcx.arena.alloc_from_iter(
3148 impl_item_refs
3149 .iter()
3150 .map(|impl_item_ref| impl_item_ref.id)
3151 .map(|id| tcx.hir().local_def_id(id.hir_id)),
3152 ),
3153 hir::ItemKind::TraitAlias(..) => &[],
3154 _ => span_bug!(item.span, "associated_item_def_ids: not impl or trait"),
3155 }
3156}
3157
3158fn def_span(tcx: TyCtxt<'_>, def_id: DefId) -> Span {
3159 tcx.hir().span_if_local(def_id).unwrap()
3160}
3161
3162/// If the given `DefId` describes an item belonging to a trait,
3163/// returns the `DefId` of the trait that the trait item belongs to;
3164/// otherwise, returns `None`.
3165fn trait_of_item(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
3166 tcx.opt_associated_item(def_id).and_then(|associated_item| match associated_item.container {
3167 TraitContainer(def_id) => Some(def_id),
3168 ImplContainer(_) => None,
3169 })
3170}
3171
3172/// Yields the parent function's `DefId` if `def_id` is an `impl Trait` definition. 2959/// Yields the parent function's `DefId` if `def_id` is an `impl Trait` definition.
3173pub fn is_impl_trait_defn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> { 2960pub fn is_impl_trait_defn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
3174 if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) { 2961 if let Some(hir_id) = tcx.hir().as_local_hir_id(def_id) {
@@ -3181,151 +2968,12 @@ pub fn is_impl_trait_defn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
3181 None 2968 None
3182} 2969}
3183 2970
3184/// See `ParamEnv` struct definition for details.
3185fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ParamEnv<'_> {
3186 // The param_env of an impl Trait type is its defining function's param_env
3187 if let Some(parent) = is_impl_trait_defn(tcx, def_id) {
3188 return param_env(tcx, parent);
3189 }
3190 // Compute the bounds on Self and the type parameters.
3191
3192 let InstantiatedPredicates { predicates } = tcx.predicates_of(def_id).instantiate_identity(tcx);
3193
3194 // Finally, we have to normalize the bounds in the environment, in
3195 // case they contain any associated type projections. This process
3196 // can yield errors if the put in illegal associated types, like
3197 // `<i32 as Foo>::Bar` where `i32` does not implement `Foo`. We
3198 // report these errors right here; this doesn't actually feel
3199 // right to me, because constructing the environment feels like a
3200 // kind of a "idempotent" action, but I'm not sure where would be
3201 // a better place. In practice, we construct environments for
3202 // every fn once during type checking, and we'll abort if there
3203 // are any errors at that point, so after type checking you can be
3204 // sure that this will succeed without errors anyway.
3205
3206 let unnormalized_env = ty::ParamEnv::new(
3207 tcx.intern_predicates(&predicates),
3208 traits::Reveal::UserFacing,
3209 tcx.sess.opts.debugging_opts.chalk.then_some(def_id),
3210 );
3211
3212 let body_id = tcx.hir().as_local_hir_id(def_id).map_or(hir::DUMMY_HIR_ID, |id| {
3213 tcx.hir().maybe_body_owned_by(id).map_or(id, |body| body.hir_id)
3214 });
3215 let cause = traits::ObligationCause::misc(tcx.def_span(def_id), body_id);
3216 traits::normalize_param_env_or_error(tcx, def_id, unnormalized_env, cause)
3217}
3218
3219fn crate_disambiguator(tcx: TyCtxt<'_>, crate_num: CrateNum) -> CrateDisambiguator {
3220 assert_eq!(crate_num, LOCAL_CRATE);
3221 tcx.sess.local_crate_disambiguator()
3222}
3223
3224fn original_crate_name(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Symbol {
3225 assert_eq!(crate_num, LOCAL_CRATE);
3226 tcx.crate_name.clone()
3227}
3228
3229fn crate_hash(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Svh {
3230 assert_eq!(crate_num, LOCAL_CRATE);
3231 tcx.hir().crate_hash
3232}
3233
3234fn instance_def_size_estimate<'tcx>(tcx: TyCtxt<'tcx>, instance_def: InstanceDef<'tcx>) -> usize {
3235 match instance_def {
3236 InstanceDef::Item(..) | InstanceDef::DropGlue(..) => {
3237 let mir = tcx.instance_mir(instance_def);
3238 mir.basic_blocks().iter().map(|bb| bb.statements.len()).sum()
3239 }
3240 // Estimate the size of other compiler-generated shims to be 1.
3241 _ => 1,
3242 }
3243}
3244
3245/// If `def_id` is an issue 33140 hack impl, returns its self type; otherwise, returns `None`.
3246///
3247/// See [`ImplOverlapKind::Issue33140`] for more details.
3248fn issue33140_self_ty(tcx: TyCtxt<'_>, def_id: DefId) -> Option<Ty<'_>> {
3249 debug!("issue33140_self_ty({:?})", def_id);
3250
3251 let trait_ref = tcx
3252 .impl_trait_ref(def_id)
3253 .unwrap_or_else(|| bug!("issue33140_self_ty called on inherent impl {:?}", def_id));
3254
3255 debug!("issue33140_self_ty({:?}), trait-ref={:?}", def_id, trait_ref);
3256
3257 let is_marker_like = tcx.impl_polarity(def_id) == ty::ImplPolarity::Positive
3258 && tcx.associated_item_def_ids(trait_ref.def_id).is_empty();
3259
3260 // Check whether these impls would be ok for a marker trait.
3261 if !is_marker_like {
3262 debug!("issue33140_self_ty - not marker-like!");
3263 return None;
3264 }
3265
3266 // impl must be `impl Trait for dyn Marker1 + Marker2 + ...`
3267 if trait_ref.substs.len() != 1 {
3268 debug!("issue33140_self_ty - impl has substs!");
3269 return None;
3270 }
3271
3272 let predicates = tcx.predicates_of(def_id);
3273 if predicates.parent.is_some() || !predicates.predicates.is_empty() {
3274 debug!("issue33140_self_ty - impl has predicates {:?}!", predicates);
3275 return None;
3276 }
3277
3278 let self_ty = trait_ref.self_ty();
3279 let self_ty_matches = match self_ty.kind {
3280 ty::Dynamic(ref data, ty::ReStatic) => data.principal().is_none(),
3281 _ => false,
3282 };
3283
3284 if self_ty_matches {
3285 debug!("issue33140_self_ty - MATCHES!");
3286 Some(self_ty)
3287 } else {
3288 debug!("issue33140_self_ty - non-matching self type");
3289 None
3290 }
3291}
3292
3293/// Check if a function is async.
3294fn asyncness(tcx: TyCtxt<'_>, def_id: DefId) -> hir::IsAsync {
3295 let hir_id = tcx
3296 .hir()
3297 .as_local_hir_id(def_id)
3298 .unwrap_or_else(|| bug!("asyncness: expected local `DefId`, got `{:?}`", def_id));
3299
3300 let node = tcx.hir().get(hir_id);
3301
3302 let fn_like = hir_map::blocks::FnLikeNode::from_node(node).unwrap_or_else(|| {
3303 bug!("asyncness: expected fn-like node but got `{:?}`", def_id);
3304 });
3305
3306 fn_like.asyncness()
3307}
3308
3309pub fn provide(providers: &mut ty::query::Providers<'_>) { 2971pub fn provide(providers: &mut ty::query::Providers<'_>) {
3310 context::provide(providers); 2972 context::provide(providers);
3311 erase_regions::provide(providers); 2973 erase_regions::provide(providers);
3312 layout::provide(providers); 2974 layout::provide(providers);
3313 *providers = ty::query::Providers { 2975 *providers =
3314 asyncness, 2976 ty::query::Providers { trait_impls_of: trait_def::trait_impls_of_provider, ..*providers };
3315 associated_item,
3316 associated_item_def_ids,
3317 adt_sized_constraint,
3318 def_span,
3319 param_env,
3320 trait_of_item,
3321 crate_disambiguator,
3322 original_crate_name,
3323 crate_hash,
3324 trait_impls_of: trait_def::trait_impls_of_provider,
3325 instance_def_size_estimate,
3326 issue33140_self_ty,
3327 ..*providers
3328 };
3329} 2977}
3330 2978
3331/// A map for the local crate mapping each type to a vector of its 2979/// A map for the local crate mapping each type to a vector of its
diff --git a/src/librustc_ast_passes/feature_gate.rs b/src/librustc_ast_passes/feature_gate.rs
index e6f4535..1e4b1ae 100644
--- a/src/librustc_ast_passes/feature_gate.rs
+++ b/src/librustc_ast_passes/feature_gate.rs
@@ -413,7 +413,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
413 self.check_extern(bare_fn_ty.ext); 413 self.check_extern(bare_fn_ty.ext);
414 } 414 }
415 ast::TyKind::Never => { 415 ast::TyKind::Never => {
416 gate_feature_post!(&self, never_type, ty.span, "The `!` type is experimental"); 416 gate_feature_post!(&self, never_type, ty.span, "the `!` type is experimental");
417 } 417 }
418 _ => {} 418 _ => {}
419 } 419 }
diff --git a/src/librustc_builtin_macros/test.rs b/src/librustc_builtin_macros/test.rs
index 0eee212..07715cd 100644
--- a/src/librustc_builtin_macros/test.rs
+++ b/src/librustc_builtin_macros/test.rs
@@ -325,7 +325,7 @@ fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic {
325 `expected = \"error message\"`", 325 `expected = \"error message\"`",
326 ) 326 )
327 .note( 327 .note(
328 "Errors in this attribute were erroneously \ 328 "errors in this attribute were erroneously \
329 allowed and will become a hard error in a \ 329 allowed and will become a hard error in a \
330 future release.", 330 future release.",
331 ) 331 )
diff --git a/src/librustc_feature/active.rs b/src/librustc_feature/active.rs
index 319cd88..4c8c47a 100644
--- a/src/librustc_feature/active.rs
+++ b/src/librustc_feature/active.rs
@@ -333,7 +333,7 @@ declare_features! (
333 (active, abi_ptx, "1.15.0", Some(38788), None), 333 (active, abi_ptx, "1.15.0", Some(38788), None),
334 334
335 /// Allows the `#[repr(i128)]` attribute for enums. 335 /// Allows the `#[repr(i128)]` attribute for enums.
336 (active, repr128, "1.16.0", Some(35118), None), 336 (active, repr128, "1.16.0", Some(56071), None),
337 337
338 /// Allows `#[link(kind="static-nobundle"...)]`. 338 /// Allows `#[link(kind="static-nobundle"...)]`.
339 (active, static_nobundle, "1.16.0", Some(37403), None), 339 (active, static_nobundle, "1.16.0", Some(37403), None),
@@ -481,7 +481,7 @@ declare_features! (
481 (active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None), 481 (active, arbitrary_enum_discriminant, "1.37.0", Some(60553), None),
482 482
483 /// Allows `impl Trait` with multiple unrelated lifetimes. 483 /// Allows `impl Trait` with multiple unrelated lifetimes.
484 (active, member_constraints, "1.37.0", Some(61977), None), 484 (active, member_constraints, "1.37.0", Some(61997), None),
485 485
486 /// Allows `async || body` closures. 486 /// Allows `async || body` closures.
487 (active, async_closure, "1.37.0", Some(62290), None), 487 (active, async_closure, "1.37.0", Some(62290), None),
diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml
index 7baae90..1fe5248 100644
--- a/src/librustc_interface/Cargo.toml
+++ b/src/librustc_interface/Cargo.toml
@@ -40,6 +40,7 @@ rustc_errors = { path = "../librustc_errors" }
40rustc_plugin_impl = { path = "../librustc_plugin_impl" } 40rustc_plugin_impl = { path = "../librustc_plugin_impl" }
41rustc_privacy = { path = "../librustc_privacy" } 41rustc_privacy = { path = "../librustc_privacy" }
42rustc_resolve = { path = "../librustc_resolve" } 42rustc_resolve = { path = "../librustc_resolve" }
43rustc_ty = { path = "../librustc_ty" }
43tempfile = "3.0.5" 44tempfile = "3.0.5"
44once_cell = "1" 45once_cell = "1"
45 46
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs
index 5f0d9ed..c4444fb 100644
--- a/src/librustc_interface/passes.rs
+++ b/src/librustc_interface/passes.rs
@@ -680,6 +680,7 @@ pub fn default_provide(providers: &mut ty::query::Providers<'_>) {
680 rustc_passes::provide(providers); 680 rustc_passes::provide(providers);
681 rustc_resolve::provide(providers); 681 rustc_resolve::provide(providers);
682 rustc_traits::provide(providers); 682 rustc_traits::provide(providers);
683 rustc_ty::provide(providers);
683 rustc_metadata::provide(providers); 684 rustc_metadata::provide(providers);
684 rustc_lint::provide(providers); 685 rustc_lint::provide(providers);
685 rustc_codegen_utils::provide(providers); 686 rustc_codegen_utils::provide(providers);
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs
index 6aa809a..6314c2b 100644
--- a/src/librustc_lint/builtin.rs
+++ b/src/librustc_lint/builtin.rs
@@ -657,7 +657,7 @@ impl EarlyLintPass for AnonymousParameters {
657 ) 657 )
658 .span_suggestion( 658 .span_suggestion(
659 arg.pat.span, 659 arg.pat.span,
660 "Try naming the parameter or explicitly \ 660 "try naming the parameter or explicitly \
661 ignoring it", 661 ignoring it",
662 format!("_: {}", ty_snip), 662 format!("_: {}", ty_snip),
663 appl, 663 appl,
@@ -1934,21 +1934,21 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
1934 use rustc::ty::TyKind::*; 1934 use rustc::ty::TyKind::*;
1935 match ty.kind { 1935 match ty.kind {
1936 // Primitive types that don't like 0 as a value. 1936 // Primitive types that don't like 0 as a value.
1937 Ref(..) => Some((format!("References must be non-null"), None)), 1937 Ref(..) => Some((format!("references must be non-null"), None)),
1938 Adt(..) if ty.is_box() => Some((format!("`Box` must be non-null"), None)), 1938 Adt(..) if ty.is_box() => Some((format!("`Box` must be non-null"), None)),
1939 FnPtr(..) => Some((format!("Function pointers must be non-null"), None)), 1939 FnPtr(..) => Some((format!("function pointers must be non-null"), None)),
1940 Never => Some((format!("The never type (`!`) has no valid value"), None)), 1940 Never => Some((format!("the `!` type has no valid value"), None)),
1941 RawPtr(tm) if matches!(tm.ty.kind, Dynamic(..)) => 1941 RawPtr(tm) if matches!(tm.ty.kind, Dynamic(..)) =>
1942 // raw ptr to dyn Trait 1942 // raw ptr to dyn Trait
1943 { 1943 {
1944 Some((format!("The vtable of a wide raw pointer must be non-null"), None)) 1944 Some((format!("the vtable of a wide raw pointer must be non-null"), None))
1945 } 1945 }
1946 // Primitive types with other constraints. 1946 // Primitive types with other constraints.
1947 Bool if init == InitKind::Uninit => { 1947 Bool if init == InitKind::Uninit => {
1948 Some((format!("Booleans must be `true` or `false`"), None)) 1948 Some((format!("booleans must be either `true` or `false`"), None))
1949 } 1949 }
1950 Char if init == InitKind::Uninit => { 1950 Char if init == InitKind::Uninit => {
1951 Some((format!("Characters must be a valid unicode codepoint"), None)) 1951 Some((format!("characters must be a valid Unicode codepoint"), None))
1952 } 1952 }
1953 // Recurse and checks for some compound types. 1953 // Recurse and checks for some compound types.
1954 Adt(adt_def, substs) if !adt_def.is_union() => { 1954 Adt(adt_def, substs) if !adt_def.is_union() => {
@@ -1959,13 +1959,16 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
1959 // return `Bound::Excluded`. (And we have tests checking that we 1959 // return `Bound::Excluded`. (And we have tests checking that we
1960 // handle the attribute correctly.) 1960 // handle the attribute correctly.)
1961 (Bound::Included(lo), _) if lo > 0 => { 1961 (Bound::Included(lo), _) if lo > 0 => {
1962 return Some((format!("{} must be non-null", ty), None)); 1962 return Some((format!("`{}` must be non-null", ty), None));
1963 } 1963 }
1964 (Bound::Included(_), _) | (_, Bound::Included(_)) 1964 (Bound::Included(_), _) | (_, Bound::Included(_))
1965 if init == InitKind::Uninit => 1965 if init == InitKind::Uninit =>
1966 { 1966 {
1967 return Some(( 1967 return Some((
1968 format!("{} must be initialized inside its custom valid range", ty), 1968 format!(
1969 "`{}` must be initialized inside its custom valid range",
1970 ty,
1971 ),
1969 None, 1972 None,
1970 )); 1973 ));
1971 } 1974 }
@@ -1973,7 +1976,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
1973 } 1976 }
1974 // Now, recurse. 1977 // Now, recurse.
1975 match adt_def.variants.len() { 1978 match adt_def.variants.len() {
1976 0 => Some((format!("0-variant enums have no valid value"), None)), 1979 0 => Some((format!("enums with no variants have no valid value"), None)),
1977 1 => { 1980 1 => {
1978 // Struct, or enum with exactly one variant. 1981 // Struct, or enum with exactly one variant.
1979 // Proceed recursively, check all fields. 1982 // Proceed recursively, check all fields.
diff --git a/src/librustc_mir/borrow_check/nll.rs b/src/librustc_mir/borrow_check/nll.rs
index 151a2c4..73718d5 100644
--- a/src/librustc_mir/borrow_check/nll.rs
+++ b/src/librustc_mir/borrow_check/nll.rs
@@ -360,7 +360,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
360 // better. 360 // better.
361 361
362 if let Some(closure_region_requirements) = closure_region_requirements { 362 if let Some(closure_region_requirements) = closure_region_requirements {
363 let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "External requirements"); 363 let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "external requirements");
364 364
365 regioncx.annotate(tcx, &mut err); 365 regioncx.annotate(tcx, &mut err);
366 366
@@ -379,7 +379,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
379 379
380 err.buffer(errors_buffer); 380 err.buffer(errors_buffer);
381 } else { 381 } else {
382 let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "No external requirements"); 382 let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "no external requirements");
383 regioncx.annotate(tcx, &mut err); 383 regioncx.annotate(tcx, &mut err);
384 384
385 err.buffer(errors_buffer); 385 err.buffer(errors_buffer);
diff --git a/src/librustc_parse/parser/attr.rs b/src/librustc_parse/parser/attr.rs
index 81f31b2..3d40b91 100644
--- a/src/librustc_parse/parser/attr.rs
+++ b/src/librustc_parse/parser/attr.rs
@@ -236,8 +236,8 @@ impl<'a> Parser<'a> {
236 self.struct_span_err(lit.span, msg) 236 self.struct_span_err(lit.span, msg)
237 .help( 237 .help(
238 "instead of using a suffixed literal \ 238 "instead of using a suffixed literal \
239 (1u8, 1.0f32, etc.), use an unsuffixed version \ 239 (`1u8`, `1.0f32`, etc.), use an unsuffixed version \
240 (1, 1.0, etc.).", 240 (`1`, `1.0`, etc.)",
241 ) 241 )
242 .emit() 242 .emit()
243 } 243 }
diff --git a/src/librustc_parse/parser/pat.rs b/src/librustc_parse/parser/pat.rs
index 0c2cfc2..549acf6 100644
--- a/src/librustc_parse/parser/pat.rs
+++ b/src/librustc_parse/parser/pat.rs
@@ -209,13 +209,13 @@ impl<'a> Parser<'a> {
209 if let Ok(seq_snippet) = self.span_to_snippet(seq_span) { 209 if let Ok(seq_snippet) = self.span_to_snippet(seq_span) {
210 err.span_suggestion( 210 err.span_suggestion(
211 seq_span, 211 seq_span,
212 "try adding parentheses to match on a tuple..", 212 "try adding parentheses to match on a tuple...",
213 format!("({})", seq_snippet), 213 format!("({})", seq_snippet),
214 Applicability::MachineApplicable, 214 Applicability::MachineApplicable,
215 ) 215 )
216 .span_suggestion( 216 .span_suggestion(
217 seq_span, 217 seq_span,
218 "..or a vertical bar to match on multiple alternatives", 218 "...or a vertical bar to match on multiple alternatives",
219 format!("{}", seq_snippet.replace(",", " |")), 219 format!("{}", seq_snippet.replace(",", " |")),
220 Applicability::MachineApplicable, 220 Applicability::MachineApplicable,
221 ); 221 );
diff --git a/src/librustc_passes/diagnostic_items.rs b/src/librustc_passes/diagnostic_items.rs
index c083830..8d220a3 100644
--- a/src/librustc_passes/diagnostic_items.rs
+++ b/src/librustc_passes/diagnostic_items.rs
@@ -73,7 +73,7 @@ fn collect_item(
73 )), 73 )),
74 }; 74 };
75 if let Some(span) = tcx.hir().span_if_local(original_def_id) { 75 if let Some(span) = tcx.hir().span_if_local(original_def_id) {
76 err.span_note(span, "first defined here."); 76 err.span_note(span, "first defined here");
77 } else { 77 } else {
78 err.note(&format!( 78 err.note(&format!(
79 "first defined in crate `{}`.", 79 "first defined in crate `{}`.",
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index 2913864..e8ed64a 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -963,7 +963,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
963 .session 963 .session
964 .struct_span_err( 964 .struct_span_err(
965 attr.span, 965 attr.span,
966 "`macro_use` is not supported on `extern crate self`", 966 "`#[macro_use]` is not supported on `extern crate self`",
967 ) 967 )
968 .emit(); 968 .emit();
969 } 969 }
@@ -1054,10 +1054,10 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
1054 fn contains_macro_use(&mut self, attrs: &[ast::Attribute]) -> bool { 1054 fn contains_macro_use(&mut self, attrs: &[ast::Attribute]) -> bool {
1055 for attr in attrs { 1055 for attr in attrs {
1056 if attr.check_name(sym::macro_escape) { 1056 if attr.check_name(sym::macro_escape) {
1057 let msg = "macro_escape is a deprecated synonym for macro_use"; 1057 let msg = "`#[macro_escape]` is a deprecated synonym for `#[macro_use]`";
1058 let mut err = self.r.session.struct_span_warn(attr.span, msg); 1058 let mut err = self.r.session.struct_span_warn(attr.span, msg);
1059 if let ast::AttrStyle::Inner = attr.style { 1059 if let ast::AttrStyle::Inner = attr.style {
1060 err.help("consider an outer attribute, `#[macro_use]` mod ...").emit(); 1060 err.help("try an outer attribute: `#[macro_use]`").emit();
1061 } else { 1061 } else {
1062 err.emit(); 1062 err.emit();
1063 } 1063 }
@@ -1066,7 +1066,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
1066 } 1066 }
1067 1067
1068 if !attr.is_word() { 1068 if !attr.is_word() {
1069 self.r.session.span_err(attr.span, "arguments to macro_use are not allowed here"); 1069 self.r.session.span_err(attr.span, "arguments to `macro_use` are not allowed here");
1070 } 1070 }
1071 return true; 1071 return true;
1072 } 1072 }
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 8e4630c..8d5afb1 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -2006,7 +2006,7 @@ impl<'a> Resolver<'a> {
2006 continue; 2006 continue;
2007 } 2007 }
2008 } 2008 }
2009 let msg = "there are too many initial `super`s.".to_string(); 2009 let msg = "there are too many leading `super` keywords".to_string();
2010 return PathResult::Failed { 2010 return PathResult::Failed {
2011 span: ident.span, 2011 span: ident.span,
2012 label: msg, 2012 label: msg,
diff --git a/src/librustc_ty/Cargo.toml b/src/librustc_ty/Cargo.toml
new file mode 100644
index 0000000..fb0d93f
--- /dev/null
+++ b/src/librustc_ty/Cargo.toml
@@ -0,0 +1,16 @@
1[package]
2authors = ["The Rust Project Developers"]
3name = "rustc_ty"
4version = "0.0.0"
5edition = "2018"
6
7[lib]
8name = "rustc_ty"
9path = "lib.rs"
10
11[dependencies]
12log = "0.4"
13rustc = { path = "../librustc" }
14rustc_data_structures = { path = "../librustc_data_structures" }
15rustc_hir = { path = "../librustc_hir" }
16rustc_span = { path = "../librustc_span" }
diff --git a/src/librustc_ty/lib.rs b/src/librustc_ty/lib.rs
new file mode 100644
index 0000000..2548d2c
--- /dev/null
+++ b/src/librustc_ty/lib.rs
@@ -0,0 +1,25 @@
1//! Various checks
2//!
3//! # Note
4//!
5//! This API is completely unstable and subject to change.
6
7#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
8#![feature(bool_to_option)]
9#![feature(in_band_lifetimes)]
10#![feature(nll)]
11#![feature(slice_patterns)]
12#![recursion_limit = "256"]
13
14#[macro_use]
15extern crate rustc;
16#[macro_use]
17extern crate log;
18
19use rustc::ty::query::Providers;
20
21mod ty;
22
23pub fn provide(providers: &mut Providers<'_>) {
24 ty::provide(providers);
25}
diff --git a/src/librustc_ty/ty.rs b/src/librustc_ty/ty.rs
new file mode 100644
index 0000000..fc8beb6
--- /dev/null
+++ b/src/librustc_ty/ty.rs
@@ -0,0 +1,369 @@
1use rustc::hir::map as hir_map;
2use rustc::session::CrateDisambiguator;
3use rustc::traits::{self};
4use rustc::ty::subst::Subst;
5use rustc::ty::{self, ToPredicate, Ty, TyCtxt};
6use rustc_data_structures::svh::Svh;
7use rustc_hir as hir;
8use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
9use rustc_span::symbol::Symbol;
10use rustc_span::Span;
11
12fn sized_constraint_for_ty(tcx: TyCtxt<'tcx>, adtdef: &ty::AdtDef, ty: Ty<'tcx>) -> Vec<Ty<'tcx>> {
13 use ty::TyKind::*;
14
15 let result = match ty.kind {
16 Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
17 | FnPtr(_) | Array(..) | Closure(..) | Generator(..) | Never => vec![],
18
19 Str | Dynamic(..) | Slice(_) | Foreign(..) | Error | GeneratorWitness(..) => {
20 // these are never sized - return the target type
21 vec![ty]
22 }
23
24 Tuple(ref tys) => match tys.last() {
25 None => vec![],
26 Some(ty) => sized_constraint_for_ty(tcx, adtdef, ty.expect_ty()),
27 },
28
29 Adt(adt, substs) => {
30 // recursive case
31 let adt_tys = adt.sized_constraint(tcx);
32 debug!("sized_constraint_for_ty({:?}) intermediate = {:?}", ty, adt_tys);
33 adt_tys
34 .iter()
35 .map(|ty| ty.subst(tcx, substs))
36 .flat_map(|ty| sized_constraint_for_ty(tcx, adtdef, ty))
37 .collect()
38 }
39
40 Projection(..) | Opaque(..) => {
41 // must calculate explicitly.
42 // FIXME: consider special-casing always-Sized projections
43 vec![ty]
44 }
45
46 UnnormalizedProjection(..) => bug!("only used with chalk-engine"),
47
48 Param(..) => {
49 // perf hack: if there is a `T: Sized` bound, then
50 // we know that `T` is Sized and do not need to check
51 // it on the impl.
52
53 let sized_trait = match tcx.lang_items().sized_trait() {
54 Some(x) => x,
55 _ => return vec![ty],
56 };
57 let sized_predicate = ty::Binder::dummy(ty::TraitRef {
58 def_id: sized_trait,
59 substs: tcx.mk_substs_trait(ty, &[]),
60 })
61 .to_predicate();
62 let predicates = tcx.predicates_of(adtdef.did).predicates;
63 if predicates.iter().any(|(p, _)| *p == sized_predicate) { vec![] } else { vec![ty] }
64 }
65
66 Placeholder(..) | Bound(..) | Infer(..) => {
67 bug!("unexpected type `{:?}` in sized_constraint_for_ty", ty)
68 }
69 };
70 debug!("sized_constraint_for_ty({:?}) = {:?}", ty, result);
71 result
72}
73
74fn associated_item_from_trait_item_ref(
75 tcx: TyCtxt<'_>,
76 parent_def_id: DefId,
77 parent_vis: &hir::Visibility<'_>,
78 trait_item_ref: &hir::TraitItemRef,
79) -> ty::AssocItem {
80 let def_id = tcx.hir().local_def_id(trait_item_ref.id.hir_id);
81 let (kind, has_self) = match trait_item_ref.kind {
82 hir::AssocItemKind::Const => (ty::AssocKind::Const, false),
83 hir::AssocItemKind::Method { has_self } => (ty::AssocKind::Method, has_self),
84 hir::AssocItemKind::Type => (ty::AssocKind::Type, false),
85 hir::AssocItemKind::OpaqueTy => bug!("only impls can have opaque types"),
86 };
87
88 ty::AssocItem {
89 ident: trait_item_ref.ident,
90 kind,
91 // Visibility of trait items is inherited from their traits.
92 vis: ty::Visibility::from_hir(parent_vis, trait_item_ref.id.hir_id, tcx),
93 defaultness: trait_item_ref.defaultness,
94 def_id,
95 container: ty::TraitContainer(parent_def_id),
96 method_has_self_argument: has_self,
97 }
98}
99
100fn associated_item_from_impl_item_ref(
101 tcx: TyCtxt<'_>,
102 parent_def_id: DefId,
103 impl_item_ref: &hir::ImplItemRef<'_>,
104) -> ty::AssocItem {
105 let def_id = tcx.hir().local_def_id(impl_item_ref.id.hir_id);
106 let (kind, has_self) = match impl_item_ref.kind {
107 hir::AssocItemKind::Const => (ty::AssocKind::Const, false),
108 hir::AssocItemKind::Method { has_self } => (ty::AssocKind::Method, has_self),
109 hir::AssocItemKind::Type => (ty::AssocKind::Type, false),
110 hir::AssocItemKind::OpaqueTy => (ty::AssocKind::OpaqueTy, false),
111 };
112
113 ty::AssocItem {
114 ident: impl_item_ref.ident,
115 kind,
116 // Visibility of trait impl items doesn't matter.
117 vis: ty::Visibility::from_hir(&impl_item_ref.vis, impl_item_ref.id.hir_id, tcx),
118 defaultness: impl_item_ref.defaultness,
119 def_id,
120 container: ty::ImplContainer(parent_def_id),
121 method_has_self_argument: has_self,
122 }
123}
124
125fn associated_item(tcx: TyCtxt<'_>, def_id: DefId) -> ty::AssocItem {
126 let id = tcx.hir().as_local_hir_id(def_id).unwrap();
127 let parent_id = tcx.hir().get_parent_item(id);
128 let parent_def_id = tcx.hir().local_def_id(parent_id);
129 let parent_item = tcx.hir().expect_item(parent_id);
130 match parent_item.kind {
131 hir::ItemKind::Impl(.., ref impl_item_refs) => {
132 if let Some(impl_item_ref) = impl_item_refs.iter().find(|i| i.id.hir_id == id) {
133 let assoc_item =
134 associated_item_from_impl_item_ref(tcx, parent_def_id, impl_item_ref);
135 debug_assert_eq!(assoc_item.def_id, def_id);
136 return assoc_item;
137 }
138 }
139
140 hir::ItemKind::Trait(.., ref trait_item_refs) => {
141 if let Some(trait_item_ref) = trait_item_refs.iter().find(|i| i.id.hir_id == id) {
142 let assoc_item = associated_item_from_trait_item_ref(
143 tcx,
144 parent_def_id,
145 &parent_item.vis,
146 trait_item_ref,
147 );
148 debug_assert_eq!(assoc_item.def_id, def_id);
149 return assoc_item;
150 }
151 }
152
153 _ => {}
154 }
155
156 span_bug!(
157 parent_item.span,
158 "unexpected parent of trait or impl item or item not found: {:?}",
159 parent_item.kind
160 )
161}
162
163/// Calculates the `Sized` constraint.
164///
165/// In fact, there are only a few options for the types in the constraint:
166/// - an obviously-unsized type
167/// - a type parameter or projection whose Sizedness can't be known
168/// - a tuple of type parameters or projections, if there are multiple
169/// such.
170/// - a Error, if a type contained itself. The representability
171/// check should catch this case.
172fn adt_sized_constraint(tcx: TyCtxt<'_>, def_id: DefId) -> ty::AdtSizedConstraint<'_> {
173 let def = tcx.adt_def(def_id);
174
175 let result = tcx.mk_type_list(
176 def.variants
177 .iter()
178 .flat_map(|v| v.fields.last())
179 .flat_map(|f| sized_constraint_for_ty(tcx, def, tcx.type_of(f.did))),
180 );
181
182 debug!("adt_sized_constraint: {:?} => {:?}", def, result);
183
184 ty::AdtSizedConstraint(result)
185}
186
187fn associated_item_def_ids(tcx: TyCtxt<'_>, def_id: DefId) -> &[DefId] {
188 let id = tcx.hir().as_local_hir_id(def_id).unwrap();
189 let item = tcx.hir().expect_item(id);
190 match item.kind {
191 hir::ItemKind::Trait(.., ref trait_item_refs) => tcx.arena.alloc_from_iter(
192 trait_item_refs
193 .iter()
194 .map(|trait_item_ref| trait_item_ref.id)
195 .map(|id| tcx.hir().local_def_id(id.hir_id)),
196 ),
197 hir::ItemKind::Impl(.., ref impl_item_refs) => tcx.arena.alloc_from_iter(
198 impl_item_refs
199 .iter()
200 .map(|impl_item_ref| impl_item_ref.id)
201 .map(|id| tcx.hir().local_def_id(id.hir_id)),
202 ),
203 hir::ItemKind::TraitAlias(..) => &[],
204 _ => span_bug!(item.span, "associated_item_def_ids: not impl or trait"),
205 }
206}
207
208fn def_span(tcx: TyCtxt<'_>, def_id: DefId) -> Span {
209 tcx.hir().span_if_local(def_id).unwrap()
210}
211
212/// If the given `DefId` describes an item belonging to a trait,
213/// returns the `DefId` of the trait that the trait item belongs to;
214/// otherwise, returns `None`.
215fn trait_of_item(tcx: TyCtxt<'_>, def_id: DefId) -> Option<DefId> {
216 tcx.opt_associated_item(def_id).and_then(|associated_item| match associated_item.container {
217 ty::TraitContainer(def_id) => Some(def_id),
218 ty::ImplContainer(_) => None,
219 })
220}
221
222/// See `ParamEnv` struct definition for details.
223fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
224 // The param_env of an impl Trait type is its defining function's param_env
225 if let Some(parent) = ty::is_impl_trait_defn(tcx, def_id) {
226 return param_env(tcx, parent);
227 }
228 // Compute the bounds on Self and the type parameters.
229
230 let ty::InstantiatedPredicates { predicates } =
231 tcx.predicates_of(def_id).instantiate_identity(tcx);
232
233 // Finally, we have to normalize the bounds in the environment, in
234 // case they contain any associated type projections. This process
235 // can yield errors if the put in illegal associated types, like
236 // `<i32 as Foo>::Bar` where `i32` does not implement `Foo`. We
237 // report these errors right here; this doesn't actually feel
238 // right to me, because constructing the environment feels like a
239 // kind of a "idempotent" action, but I'm not sure where would be
240 // a better place. In practice, we construct environments for
241 // every fn once during type checking, and we'll abort if there
242 // are any errors at that point, so after type checking you can be
243 // sure that this will succeed without errors anyway.
244
245 let unnormalized_env = ty::ParamEnv::new(
246 tcx.intern_predicates(&predicates),
247 traits::Reveal::UserFacing,
248 tcx.sess.opts.debugging_opts.chalk.then_some(def_id),
249 );
250
251 let body_id = tcx.hir().as_local_hir_id(def_id).map_or(hir::DUMMY_HIR_ID, |id| {
252 tcx.hir().maybe_body_owned_by(id).map_or(id, |body| body.hir_id)
253 });
254 let cause = traits::ObligationCause::misc(tcx.def_span(def_id), body_id);
255 traits::normalize_param_env_or_error(tcx, def_id, unnormalized_env, cause)
256}
257
258fn crate_disambiguator(tcx: TyCtxt<'_>, crate_num: CrateNum) -> CrateDisambiguator {
259 assert_eq!(crate_num, LOCAL_CRATE);
260 tcx.sess.local_crate_disambiguator()
261}
262
263fn original_crate_name(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Symbol {
264 assert_eq!(crate_num, LOCAL_CRATE);
265 tcx.crate_name.clone()
266}
267
268fn crate_hash(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Svh {
269 assert_eq!(crate_num, LOCAL_CRATE);
270 tcx.hir().crate_hash
271}
272
273fn instance_def_size_estimate<'tcx>(
274 tcx: TyCtxt<'tcx>,
275 instance_def: ty::InstanceDef<'tcx>,
276) -> usize {
277 use ty::InstanceDef;
278
279 match instance_def {
280 InstanceDef::Item(..) | InstanceDef::DropGlue(..) => {
281 let mir = tcx.instance_mir(instance_def);
282 mir.basic_blocks().iter().map(|bb| bb.statements.len()).sum()
283 }
284 // Estimate the size of other compiler-generated shims to be 1.
285 _ => 1,
286 }
287}
288
289/// If `def_id` is an issue 33140 hack impl, returns its self type; otherwise, returns `None`.
290///
291/// See [`ImplOverlapKind::Issue33140`] for more details.
292fn issue33140_self_ty(tcx: TyCtxt<'_>, def_id: DefId) -> Option<Ty<'_>> {
293 debug!("issue33140_self_ty({:?})", def_id);
294
295 let trait_ref = tcx
296 .impl_trait_ref(def_id)
297 .unwrap_or_else(|| bug!("issue33140_self_ty called on inherent impl {:?}", def_id));
298
299 debug!("issue33140_self_ty({:?}), trait-ref={:?}", def_id, trait_ref);
300
301 let is_marker_like = tcx.impl_polarity(def_id) == ty::ImplPolarity::Positive
302 && tcx.associated_item_def_ids(trait_ref.def_id).is_empty();
303
304 // Check whether these impls would be ok for a marker trait.
305 if !is_marker_like {
306 debug!("issue33140_self_ty - not marker-like!");
307 return None;
308 }
309
310 // impl must be `impl Trait for dyn Marker1 + Marker2 + ...`
311 if trait_ref.substs.len() != 1 {
312 debug!("issue33140_self_ty - impl has substs!");
313 return None;
314 }
315
316 let predicates = tcx.predicates_of(def_id);
317 if predicates.parent.is_some() || !predicates.predicates.is_empty() {
318 debug!("issue33140_self_ty - impl has predicates {:?}!", predicates);
319 return None;
320 }
321
322 let self_ty = trait_ref.self_ty();
323 let self_ty_matches = match self_ty.kind {
324 ty::Dynamic(ref data, ty::ReStatic) => data.principal().is_none(),
325 _ => false,
326 };
327
328 if self_ty_matches {
329 debug!("issue33140_self_ty - MATCHES!");
330 Some(self_ty)
331 } else {
332 debug!("issue33140_self_ty - non-matching self type");
333 None
334 }
335}
336
337/// Check if a function is async.
338fn asyncness(tcx: TyCtxt<'_>, def_id: DefId) -> hir::IsAsync {
339 let hir_id = tcx
340 .hir()
341 .as_local_hir_id(def_id)
342 .unwrap_or_else(|| bug!("asyncness: expected local `DefId`, got `{:?}`", def_id));
343
344 let node = tcx.hir().get(hir_id);
345
346 let fn_like = hir_map::blocks::FnLikeNode::from_node(node).unwrap_or_else(|| {
347 bug!("asyncness: expected fn-like node but got `{:?}`", def_id);
348 });
349
350 fn_like.asyncness()
351}
352
353pub fn provide(providers: &mut ty::query::Providers<'_>) {
354 *providers = ty::query::Providers {
355 asyncness,
356 associated_item,
357 associated_item_def_ids,
358 adt_sized_constraint,
359 def_span,
360 param_env,
361 trait_of_item,
362 crate_disambiguator,
363 original_crate_name,
364 crate_hash,
365 instance_def_size_estimate,
366 issue33140_self_ty,
367 ..*providers
368 };
369}
diff --git a/src/librustc_typeck/check/cast.rs b/src/librustc_typeck/check/cast.rs
index ba5e5fd..cbbfe2d 100644
--- a/src/librustc_typeck/check/cast.rs
+++ b/src/librustc_typeck/check/cast.rs
@@ -381,7 +381,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
381 if unknown_cast_to { "to" } else { "from" } 381 if unknown_cast_to { "to" } else { "from" }
382 ); 382 );
383 err.note( 383 err.note(
384 "The type information given here is insufficient to check whether \ 384 "the type information given here is insufficient to check whether \
385 the pointer cast is valid", 385 the pointer cast is valid",
386 ); 386 );
387 if unknown_cast_to { 387 if unknown_cast_to {
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs
index b84e1d3..d6c0d9c 100644
--- a/src/librustc_typeck/check/method/suggest.rs
+++ b/src/librustc_typeck/check/method/suggest.rs
@@ -479,7 +479,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
479 macro_rules! report_function { 479 macro_rules! report_function {
480 ($span:expr, $name:expr) => { 480 ($span:expr, $name:expr) => {
481 err.note(&format!( 481 err.note(&format!(
482 "{} is a function, perhaps you wish to call it", 482 "`{}` is a function, perhaps you wish to call it",
483 $name 483 $name
484 )); 484 ));
485 }; 485 };
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 92a7e18..baf9ae1 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -1664,7 +1664,7 @@ fn check_opaque_for_cycles<'tcx>(
1664 if let hir::OpaqueTyOrigin::AsyncFn = origin { 1664 if let hir::OpaqueTyOrigin::AsyncFn = origin {
1665 struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing",) 1665 struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing",)
1666 .span_label(span, "recursive `async fn`") 1666 .span_label(span, "recursive `async fn`")
1667 .note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`.") 1667 .note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`")
1668 .emit(); 1668 .emit();
1669 } else { 1669 } else {
1670 let mut err = 1670 let mut err =
diff --git a/src/libstd/f32.rs b/src/libstd/f32.rs
index 267d701..c57bce9 100644
--- a/src/libstd/f32.rs
+++ b/src/libstd/f32.rs
@@ -131,10 +131,10 @@ impl f32 {
131 /// ``` 131 /// ```
132 /// use std::f32; 132 /// use std::f32;
133 /// 133 ///
134 /// let x = 3.5_f32; 134 /// let x = 3.6_f32;
135 /// let y = -3.5_f32; 135 /// let y = -3.6_f32;
136 /// let abs_difference_x = (x.fract() - 0.5).abs(); 136 /// let abs_difference_x = (x.fract() - 0.6).abs();
137 /// let abs_difference_y = (y.fract() - (-0.5)).abs(); 137 /// let abs_difference_y = (y.fract() - (-0.6)).abs();
138 /// 138 ///
139 /// assert!(abs_difference_x <= f32::EPSILON); 139 /// assert!(abs_difference_x <= f32::EPSILON);
140 /// assert!(abs_difference_y <= f32::EPSILON); 140 /// assert!(abs_difference_y <= f32::EPSILON);
@@ -355,7 +355,7 @@ impl f32 {
355 return unsafe { intrinsics::powf32(self, n) }; 355 return unsafe { intrinsics::powf32(self, n) };
356 } 356 }
357 357
358 /// Takes the square root of a number. 358 /// Returns the square root of a number.
359 /// 359 ///
360 /// Returns NaN if `self` is a negative number. 360 /// Returns NaN if `self` is a negative number.
361 /// 361 ///
@@ -564,7 +564,7 @@ impl f32 {
564 unsafe { cmath::fdimf(self, other) } 564 unsafe { cmath::fdimf(self, other) }
565 } 565 }
566 566
567 /// Takes the cubic root of a number. 567 /// Returns the cubic root of a number.
568 /// 568 ///
569 /// # Examples 569 /// # Examples
570 /// 570 ///
diff --git a/src/libstd/f64.rs b/src/libstd/f64.rs
index 61ce7b2..d89b38e 100644
--- a/src/libstd/f64.rs
+++ b/src/libstd/f64.rs
@@ -109,10 +109,10 @@ impl f64 {
109 /// # Examples 109 /// # Examples
110 /// 110 ///
111 /// ``` 111 /// ```
112 /// let x = 3.5_f64; 112 /// let x = 3.6_f64;
113 /// let y = -3.5_f64; 113 /// let y = -3.6_f64;
114 /// let abs_difference_x = (x.fract() - 0.5).abs(); 114 /// let abs_difference_x = (x.fract() - 0.6).abs();
115 /// let abs_difference_y = (y.fract() - (-0.5)).abs(); 115 /// let abs_difference_y = (y.fract() - (-0.6)).abs();
116 /// 116 ///
117 /// assert!(abs_difference_x < 1e-10); 117 /// assert!(abs_difference_x < 1e-10);
118 /// assert!(abs_difference_y < 1e-10); 118 /// assert!(abs_difference_y < 1e-10);
@@ -323,7 +323,7 @@ impl f64 {
323 unsafe { intrinsics::powf64(self, n) } 323 unsafe { intrinsics::powf64(self, n) }
324 } 324 }
325 325
326 /// Takes the square root of a number. 326 /// Returns the square root of a number.
327 /// 327 ///
328 /// Returns NaN if `self` is a negative number. 328 /// Returns NaN if `self` is a negative number.
329 /// 329 ///
@@ -506,7 +506,7 @@ impl f64 {
506 unsafe { cmath::fdim(self, other) } 506 unsafe { cmath::fdim(self, other) }
507 } 507 }
508 508
509 /// Takes the cubic root of a number. 509 /// Returns the cubic root of a number.
510 /// 510 ///
511 /// # Examples 511 /// # Examples
512 /// 512 ///
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs
index bfadeaf..fee7ace 100644
--- a/src/libstd/panicking.rs
+++ b/src/libstd/panicking.rs
@@ -208,7 +208,7 @@ fn default_hook(info: &PanicInfo<'_>) {
208 let _ = writeln!( 208 let _ = writeln!(
209 err, 209 err,
210 "note: run with `RUST_BACKTRACE=1` \ 210 "note: run with `RUST_BACKTRACE=1` \
211 environment variable to display a backtrace." 211 environment variable to display a backtrace"
212 ); 212 );
213 } 213 }
214 } 214 }
diff --git a/src/test/compile-fail/panic-handler-twice.rs b/src/test/compile-fail/panic-handler-twice.rs
index c0f2c51..0c5359b 100644
--- a/src/test/compile-fail/panic-handler-twice.rs
+++ b/src/test/compile-fail/panic-handler-twice.rs
@@ -10,7 +10,7 @@ use core::panic::PanicInfo;
10 10
11#[panic_handler] 11#[panic_handler]
12fn panic(info: &PanicInfo) -> ! { 12fn panic(info: &PanicInfo) -> ! {
13 //~^ error duplicate lang item found: `panic_impl` 13 //~^ ERROR found duplicate lang item `panic_impl`
14 loop {} 14 loop {}
15} 15}
16 16
diff --git a/src/test/run-make-fulldeps/libtest-json/output-default.json b/src/test/run-make-fulldeps/libtest-json/output-default.json
index 8046d72..0cd9ab7 100644
--- a/src/test/run-make-fulldeps/libtest-json/output-default.json
+++ b/src/test/run-make-fulldeps/libtest-json/output-default.json
@@ -2,7 +2,7 @@
2{ "type": "test", "event": "started", "name": "a" } 2{ "type": "test", "event": "started", "name": "a" }
3{ "type": "test", "name": "a", "event": "ok" } 3{ "type": "test", "name": "a", "event": "ok" }
4{ "type": "test", "event": "started", "name": "b" } 4{ "type": "test", "event": "started", "name": "b" }
5{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.\n" } 5{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
6{ "type": "test", "event": "started", "name": "c" } 6{ "type": "test", "event": "started", "name": "c" }
7{ "type": "test", "name": "c", "event": "ok" } 7{ "type": "test", "name": "c", "event": "ok" }
8{ "type": "test", "event": "started", "name": "d" } 8{ "type": "test", "event": "started", "name": "d" }
diff --git a/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json b/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
index 3033162..dfaf005 100644
--- a/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
+++ b/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
@@ -2,7 +2,7 @@
2{ "type": "test", "event": "started", "name": "a" } 2{ "type": "test", "event": "started", "name": "a" }
3{ "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" } 3{ "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" }
4{ "type": "test", "event": "started", "name": "b" } 4{ "type": "test", "event": "started", "name": "b" }
5{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.\n" } 5{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
6{ "type": "test", "event": "started", "name": "c" } 6{ "type": "test", "event": "started", "name": "c" }
7{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:15:5\n" } 7{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:15:5\n" }
8{ "type": "test", "event": "started", "name": "d" } 8{ "type": "test", "event": "started", "name": "d" }
diff --git a/src/test/rustdoc-ui/failed-doctest-output.stdout b/src/test/rustdoc-ui/failed-doctest-output.stdout
index 9887d07..ee79ae1 100644
--- a/src/test/rustdoc-ui/failed-doctest-output.stdout
+++ b/src/test/rustdoc-ui/failed-doctest-output.stdout
@@ -27,7 +27,7 @@ stderr:
27stderr 1 27stderr 1
28stderr 2 28stderr 2
29thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:7:1 29thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:7:1
30note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 30note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
31 31
32 32
33 33
diff --git a/src/test/ui/anon-params-deprecated.stderr b/src/test/ui/anon-params-deprecated.stderr
index e97dbc1..8e4fa70 100644
--- a/src/test/ui/anon-params-deprecated.stderr
+++ b/src/test/ui/anon-params-deprecated.stderr
@@ -2,7 +2,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
2 --> $DIR/anon-params-deprecated.rs:9:12 2 --> $DIR/anon-params-deprecated.rs:9:12
3 | 3 |
4LL | fn foo(i32); 4LL | fn foo(i32);
5 | ^^^ help: Try naming the parameter or explicitly ignoring it: `_: i32` 5 | ^^^ help: try naming the parameter or explicitly ignoring it: `_: i32`
6 | 6 |
7note: lint level defined here 7note: lint level defined here
8 --> $DIR/anon-params-deprecated.rs:1:9 8 --> $DIR/anon-params-deprecated.rs:1:9
@@ -16,7 +16,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
16 --> $DIR/anon-params-deprecated.rs:12:30 16 --> $DIR/anon-params-deprecated.rs:12:30
17 | 17 |
18LL | fn bar_with_default_impl(String, String) {} 18LL | fn bar_with_default_impl(String, String) {}
19 | ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String` 19 | ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`
20 | 20 |
21 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! 21 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
22 = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686> 22 = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
@@ -25,7 +25,7 @@ warning: anonymous parameters are deprecated and will be removed in the next edi
25 --> $DIR/anon-params-deprecated.rs:12:38 25 --> $DIR/anon-params-deprecated.rs:12:38
26 | 26 |
27LL | fn bar_with_default_impl(String, String) {} 27LL | fn bar_with_default_impl(String, String) {}
28 | ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String` 28 | ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`
29 | 29 |
30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition! 30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
31 = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686> 31 = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
diff --git a/src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr b/src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
index 9249308..f6e4c8b 100644
--- a/src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
+++ b/src/test/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
@@ -4,7 +4,7 @@ error[E0733]: recursion in an `async fn` requires boxing
4LL | async fn rec_1() { 4LL | async fn rec_1() {
5 | ^ recursive `async fn` 5 | ^ recursive `async fn`
6 | 6 |
7 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`. 7 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
8 8
9error[E0733]: recursion in an `async fn` requires boxing 9error[E0733]: recursion in an `async fn` requires boxing
10 --> $DIR/mutually-recursive-async-impl-trait-type.rs:9:18 10 --> $DIR/mutually-recursive-async-impl-trait-type.rs:9:18
@@ -12,7 +12,7 @@ error[E0733]: recursion in an `async fn` requires boxing
12LL | async fn rec_2() { 12LL | async fn rec_2() {
13 | ^ recursive `async fn` 13 | ^ recursive `async fn`
14 | 14 |
15 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`. 15 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
16 16
17error: aborting due to 2 previous errors 17error: aborting due to 2 previous errors
18 18
diff --git a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr
index 9ee0140..892d91e 100644
--- a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr
+++ b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr
@@ -4,7 +4,7 @@ error[E0733]: recursion in an `async fn` requires boxing
4LL | async fn recursive_async_function() -> () { 4LL | async fn recursive_async_function() -> () {
5 | ^^ recursive `async fn` 5 | ^^ recursive `async fn`
6 | 6 |
7 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`. 7 = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
8 8
9error: aborting due to previous error 9error: aborting due to previous error
10 10
diff --git a/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr b/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr
index bde7f25..51e80bb 100644
--- a/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr
+++ b/src/test/ui/consts/const-eval/validate_uninhabited_zsts.stderr
@@ -34,7 +34,7 @@ LL | unsafe { std::mem::transmute(()) }
34 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 34 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
35 | 35 |
36 = note: `#[warn(invalid_value)]` on by default 36 = note: `#[warn(invalid_value)]` on by default
37 = note: The never type (`!`) has no valid value 37 = note: the `!` type has no valid value
38 38
39warning: the type `Empty` does not permit zero-initialization 39warning: the type `Empty` does not permit zero-initialization
40 --> $DIR/validate_uninhabited_zsts.rs:17:35 40 --> $DIR/validate_uninhabited_zsts.rs:17:35
@@ -45,7 +45,7 @@ LL | const BAR: [Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
45 | this code causes undefined behavior when executed 45 | this code causes undefined behavior when executed
46 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 46 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
47 | 47 |
48 = note: 0-variant enums have no valid value 48 = note: enums with no variants have no valid value
49 49
50error: aborting due to previous error 50error: aborting due to previous error
51 51
diff --git a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
index 88418e5..655c317 100644
--- a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
+++ b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
@@ -11,7 +11,7 @@ LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *m
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 12
13thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:346:17 13thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:346:17
14note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 14note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
15 15
16error: internal compiler error: unexpected panic 16error: internal compiler error: unexpected panic
17 17
diff --git a/src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr b/src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr
index c148842..c292fce 100644
--- a/src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr
+++ b/src/test/ui/consts/miri_unleashed/mutable_references_ice.stderr
@@ -7,7 +7,7 @@ LL | x: &UnsafeCell::new(42),
7thread 'rustc' panicked at 'assertion failed: `(left != right)` 7thread 'rustc' panicked at 'assertion failed: `(left != right)`
8 left: `Const`, 8 left: `Const`,
9 right: `Const`: UnsafeCells are not allowed behind references in constants. This should have been prevented statically by const qualification. If this were allowed one would be able to change a constant at one use site and other use sites could observe that mutation.', src/librustc_mir/interpret/intern.rs:LL:CC 9 right: `Const`: UnsafeCells are not allowed behind references in constants. This should have been prevented statically by const qualification. If this were allowed one would be able to change a constant at one use site and other use sites could observe that mutation.', src/librustc_mir/interpret/intern.rs:LL:CC
10note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. 10note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
11 11
12error: internal compiler error: unexpected panic 12error: internal compiler error: unexpected panic
13 13
diff --git a/src/test/ui/deprecation/deprecated-macro_escape-inner.rs b/src/test/ui/deprecation/deprecated-macro_escape-inner.rs
index 957e839..e2957c4 100644
--- a/src/test/ui/deprecation/deprecated-macro_escape-inner.rs
+++ b/src/test/ui/deprecation/deprecated-macro_escape-inner.rs
@@ -1,7 +1,7 @@
1// run-pass 1// run-pass
2 2
3mod foo { 3mod foo {
4 #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use 4 #![macro_escape] //~ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
5} 5}
6 6
7fn main() { 7fn main() {
diff --git a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
index 1b69270..4b0fc07 100644
--- a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
+++ b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
@@ -1,8 +1,8 @@
1warning: macro_escape is a deprecated synonym for macro_use 1warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
2 --> $DIR/deprecated-macro_escape-inner.rs:4:5 2 --> $DIR/deprecated-macro_escape-inner.rs:4:5
3 | 3 |
4LL | #![macro_escape] 4LL | #![macro_escape]
5 | ^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^
6 | 6 |
7 = help: consider an outer attribute, `#[macro_use]` mod ... 7 = help: try an outer attribute: `#[macro_use]`
8 8
diff --git a/src/test/ui/deprecation/deprecated-macro_escape.rs b/src/test/ui/deprecation/deprecated-macro_escape.rs
index 1b82a99..4a89b40 100644
--- a/src/test/ui/deprecation/deprecated-macro_escape.rs
+++ b/src/test/ui/deprecation/deprecated-macro_escape.rs
@@ -1,8 +1,6 @@
1// run-pass 1// run-pass
2 2
3#[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use 3#[macro_escape] //~ WARNING `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
4mod foo { 4mod foo {}
5}
6 5
7fn main() { 6fn main() {}
8}
diff --git a/src/test/ui/deprecation/deprecated-macro_escape.stderr b/src/test/ui/deprecation/deprecated-macro_escape.stderr
index b76d6d7..7009408 100644
--- a/src/test/ui/deprecation/deprecated-macro_escape.stderr
+++ b/src/test/ui/deprecation/deprecated-macro_escape.stderr
@@ -1,4 +1,4 @@
1warning: macro_escape is a deprecated synonym for macro_use 1warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
2 --> $DIR/deprecated-macro_escape.rs:3:1 2 --> $DIR/deprecated-macro_escape.rs:3:1
3 | 3 |
4LL | #[macro_escape] 4LL | #[macro_escape]
diff --git a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
index 705c909..d05d6d1 100644
--- a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
+++ b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
@@ -4,11 +4,11 @@ error: unexpected `,` in pattern
4LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") { 4LL | while let b1, b2, b3 = reading_frame.next().expect("there should be a start codon") {
5 | ^ 5 | ^
6 | 6 |
7help: try adding parentheses to match on a tuple.. 7help: try adding parentheses to match on a tuple...
8 | 8 |
9LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") { 9LL | while let (b1, b2, b3) = reading_frame.next().expect("there should be a start codon") {
10 | ^^^^^^^^^^^^ 10 | ^^^^^^^^^^^^
11help: ..or a vertical bar to match on multiple alternatives 11help: ...or a vertical bar to match on multiple alternatives
12 | 12 |
13LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") { 13LL | while let b1 | b2 | b3 = reading_frame.next().expect("there should be a start codon") {
14 | ^^^^^^^^^^^^ 14 | ^^^^^^^^^^^^
@@ -19,11 +19,11 @@ error: unexpected `,` in pattern
19LL | if let b1, b2, b3 = reading_frame.next().unwrap() { 19LL | if let b1, b2, b3 = reading_frame.next().unwrap() {
20 | ^ 20 | ^
21 | 21 |
22help: try adding parentheses to match on a tuple.. 22help: try adding parentheses to match on a tuple...
23 | 23 |
24LL | if let (b1, b2, b3) = reading_frame.next().unwrap() { 24LL | if let (b1, b2, b3) = reading_frame.next().unwrap() {
25 | ^^^^^^^^^^^^ 25 | ^^^^^^^^^^^^
26help: ..or a vertical bar to match on multiple alternatives 26help: ...or a vertical bar to match on multiple alternatives
27 | 27 |
28LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() { 28LL | if let b1 | b2 | b3 = reading_frame.next().unwrap() {
29 | ^^^^^^^^^^^^ 29 | ^^^^^^^^^^^^
@@ -34,11 +34,11 @@ error: unexpected `,` in pattern
34LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true 34LL | Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
35 | ^ 35 | ^
36 | 36 |
37help: try adding parentheses to match on a tuple.. 37help: try adding parentheses to match on a tuple...
38 | 38 |
39LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true 39LL | (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41help: ..or a vertical bar to match on multiple alternatives 41help: ...or a vertical bar to match on multiple alternatives
42 | 42 |
43LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true 43LL | Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,11 +49,11 @@ error: unexpected `,` in pattern
49LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) { 49LL | for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
50 | ^ 50 | ^
51 | 51 |
52help: try adding parentheses to match on a tuple.. 52help: try adding parentheses to match on a tuple...
53 | 53 |
54LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) { 54LL | for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
55 | ^^^^^^^^^^^^^^^ 55 | ^^^^^^^^^^^^^^^
56help: ..or a vertical bar to match on multiple alternatives 56help: ...or a vertical bar to match on multiple alternatives
57 | 57 |
58LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) { 58LL | for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
59 | ^^^^^^^^^^^^^^ 59 | ^^^^^^^^^^^^^^
@@ -64,11 +64,11 @@ error: unexpected `,` in pattern
64LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) { 64LL | for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
65 | ^ 65 | ^
66 | 66 |
67help: try adding parentheses to match on a tuple.. 67help: try adding parentheses to match on a tuple...
68 | 68 |
69LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) { 69LL | for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
70 | ^^^^^^^^^^^^^^^^^^^^^^^ 70 | ^^^^^^^^^^^^^^^^^^^^^^^
71help: ..or a vertical bar to match on multiple alternatives 71help: ...or a vertical bar to match on multiple alternatives
72 | 72 |
73LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) { 73LL | for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
74 | ^^^^^^^^^^^^^^^^^^^^^^ 74 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -79,11 +79,11 @@ error: unexpected `,` in pattern
79LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned() 79LL | let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
80 | ^ 80 | ^
81 | 81 |
82help: try adding parentheses to match on a tuple.. 82help: try adding parentheses to match on a tuple...
83 | 83 |
84LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned() 84LL | let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
85 | ^^^^^^^^^^^^ 85 | ^^^^^^^^^^^^
86help: ..or a vertical bar to match on multiple alternatives 86help: ...or a vertical bar to match on multiple alternatives
87 | 87 |
88LL | let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned() 88LL | let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
89 | ^^^^^^^^^^^ 89 | ^^^^^^^^^^^
diff --git a/src/test/ui/duplicate_entry_error.rs b/src/test/ui/duplicate_entry_error.rs
index 62df42b..b8d98a8 100644
--- a/src/test/ui/duplicate_entry_error.rs
+++ b/src/test/ui/duplicate_entry_error.rs
@@ -8,7 +8,7 @@ use std::panic::PanicInfo;
8 8
9#[lang = "panic_impl"] 9#[lang = "panic_impl"]
10fn panic_impl(info: &PanicInfo) -> ! { 10fn panic_impl(info: &PanicInfo) -> ! {
11//~^ ERROR: duplicate lang item found: `panic_impl`. 11//~^ ERROR: found duplicate lang item `panic_impl`
12 loop {} 12 loop {}
13} 13}
14 14
diff --git a/src/test/ui/duplicate_entry_error.stderr b/src/test/ui/duplicate_entry_error.stderr
index 02be11d..46b137b 100644
--- a/src/test/ui/duplicate_entry_error.stderr
+++ b/src/test/ui/duplicate_entry_error.stderr
@@ -1,4 +1,4 @@
1error[E0152]: duplicate lang item found: `panic_impl`. 1error[E0152]: found duplicate lang item `panic_impl`
2 --> $DIR/duplicate_entry_error.rs:10:1 2 --> $DIR/duplicate_entry_error.rs:10:1
3 | 3 |
4LL | / fn panic_impl(info: &PanicInfo) -> ! { 4LL | / fn panic_impl(info: &PanicInfo) -> ! {
@@ -7,7 +7,7 @@ LL | | loop {}
7LL | | } 7LL | | }
8 | |_^ 8 | |_^
9 | 9 |
10 = note: first defined in crate `std` (which `duplicate_entry_error` depends on). 10 = note: first defined in crate `std` (which `duplicate_entry_error` depends on)
11 11
12error: aborting due to previous error 12error: aborting due to previous error
13 13
diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr
index d4b59a1..c41a043 100644
--- a/src/test/ui/error-codes/E0152.stderr
+++ b/src/test/ui/error-codes/E0152.stderr
@@ -1,10 +1,10 @@
1error[E0152]: duplicate lang item found: `arc`. 1error[E0152]: found duplicate lang item `arc`
2 --> $DIR/E0152.rs:4:1 2 --> $DIR/E0152.rs:4:1
3 | 3 |
4LL | struct Foo; 4LL | struct Foo;
5 | ^^^^^^^^^^^ 5 | ^^^^^^^^^^^
6 | 6 |
7 = note: first defined in crate `alloc` (which `std` depends on). 7 = note: first defined in crate `alloc` (which `std` depends on)
8 8
9error: aborting due to previous error 9error: aborting due to previous error
10 10
diff --git a/src/test/ui/error-codes/E0658.stderr b/src/test/ui/error-codes/E0658.stderr
index 071dbcc..1cb81c8 100644
--- a/src/test/ui/error-codes/E0658.stderr
+++ b/src/test/ui/error-codes/E0658.stderr
@@ -6,7 +6,7 @@ LL | | Bar(u64),
6LL | | } 6LL | | }
7 | |_^ 7 | |_^
8 | 8 |
9 = note: for more information, see https://github.com/rust-lang/rust/issues/35118 9 = note: for more information, see https://github.com/rust-lang/rust/issues/56071
10 = help: add `#![feature(repr128)]` to the crate attributes to enable 10 = help: add `#![feature(repr128)]` to the crate attributes to enable
11 11
12error: aborting due to previous error 12error: aborting due to previous error
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
index 92c5c20..f702b10 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
@@ -464,10 +464,10 @@ mod reexport_test_harness_main {
464 464
465// Cannot feed "2700" to `#[macro_escape]` without signaling an error. 465// Cannot feed "2700" to `#[macro_escape]` without signaling an error.
466#[macro_escape] 466#[macro_escape]
467//~^ WARN macro_escape is a deprecated synonym for macro_use 467//~^ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
468mod macro_escape { 468mod macro_escape {
469 mod inner { #![macro_escape] } 469 mod inner { #![macro_escape] }
470 //~^ WARN macro_escape is a deprecated synonym for macro_use 470 //~^ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
471 471
472 #[macro_escape] fn f() { } 472 #[macro_escape] fn f() { }
473 //~^ WARN unused attribute 473 //~^ WARN unused attribute
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
index 9ce90d8..da7d8f9 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
@@ -172,19 +172,19 @@ warning: unknown lint: `x5100`
172LL | #[deny(x5100)] impl S { } 172LL | #[deny(x5100)] impl S { }
173 | ^^^^^ 173 | ^^^^^
174 174
175warning: macro_escape is a deprecated synonym for macro_use 175warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
176 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:1 176 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:466:1
177 | 177 |
178LL | #[macro_escape] 178LL | #[macro_escape]
179 | ^^^^^^^^^^^^^^^ 179 | ^^^^^^^^^^^^^^^
180 180
181warning: macro_escape is a deprecated synonym for macro_use 181warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
182 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:17 182 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:469:17
183 | 183 |
184LL | mod inner { #![macro_escape] } 184LL | mod inner { #![macro_escape] }
185 | ^^^^^^^^^^^^^^^^ 185 | ^^^^^^^^^^^^^^^^
186 | 186 |
187 = help: consider an outer attribute, `#[macro_use]` mod ... 187 = help: try an outer attribute: `#[macro_use]`
188 188
189warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 189warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
190 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:17 190 --> $DIR/issue-43106-gating-of-builtin-attrs.rs:221:17
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs
index 75a3d91..de00bc4 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs
@@ -6,6 +6,6 @@
6// check-pass 6// check-pass
7 7
8#![macro_escape] 8#![macro_escape]
9//~^ WARN macro_escape is a deprecated synonym for macro_use 9//~^ WARN `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
10 10
11fn main() {} 11fn main() {}
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
index 8575c16..402dc4e 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
@@ -1,8 +1,8 @@
1warning: macro_escape is a deprecated synonym for macro_use 1warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
2 --> $DIR/issue-43106-gating-of-macro_escape.rs:8:1 2 --> $DIR/issue-43106-gating-of-macro_escape.rs:8:1
3 | 3 |
4LL | #![macro_escape] 4LL | #![macro_escape]
5 | ^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^
6 | 6 |
7 = help: consider an outer attribute, `#[macro_use]` mod ... 7 = help: try an outer attribute: `#[macro_use]`
8 8
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs
index 4ced941..6a7ef79 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs
@@ -4,13 +4,13 @@
4// get that warning; see issue-43106-gating-of-builtin-attrs.rs 4// get that warning; see issue-43106-gating-of-builtin-attrs.rs
5 5
6#![macro_use(my_macro)] 6#![macro_use(my_macro)]
7//~^ ERROR arguments to macro_use are not allowed here 7//~^ ERROR arguments to `macro_use` are not allowed here
8 8
9#[macro_use(my_macro)] 9#[macro_use(my_macro)]
10//~^ ERROR arguments to macro_use are not allowed here 10//~^ ERROR arguments to `macro_use` are not allowed here
11mod macro_escape { 11mod macro_escape {
12 mod inner { #![macro_use(my_macro)] } 12 mod inner { #![macro_use(my_macro)] }
13 //~^ ERROR arguments to macro_use are not allowed here 13 //~^ ERROR arguments to `macro_use` are not allowed here
14 14
15 #[macro_use = "2700"] struct S; 15 #[macro_use = "2700"] struct S;
16 //~^ ERROR malformed `macro_use` attribute 16 //~^ ERROR malformed `macro_use` attribute
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr
index 3181d62..52a682e 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr
@@ -1,16 +1,16 @@
1error: arguments to macro_use are not allowed here 1error: arguments to `macro_use` are not allowed here
2 --> $DIR/issue-43106-gating-of-macro_use.rs:6:1 2 --> $DIR/issue-43106-gating-of-macro_use.rs:6:1
3 | 3 |
4LL | #![macro_use(my_macro)] 4LL | #![macro_use(my_macro)]
5 | ^^^^^^^^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^^^^^^^^
6 6
7error: arguments to macro_use are not allowed here 7error: arguments to `macro_use` are not allowed here
8 --> $DIR/issue-43106-gating-of-macro_use.rs:9:1 8 --> $DIR/issue-43106-gating-of-macro_use.rs:9:1
9 | 9 |
10LL | #[macro_use(my_macro)] 10LL | #[macro_use(my_macro)]
11 | ^^^^^^^^^^^^^^^^^^^^^^ 11 | ^^^^^^^^^^^^^^^^^^^^^^
12 12
13error: arguments to macro_use are not allowed here 13error: arguments to `macro_use` are not allowed here
14 --> $DIR/issue-43106-gating-of-macro_use.rs:12:17 14 --> $DIR/issue-43106-gating-of-macro_use.rs:12:17
15 | 15 |
16LL | mod inner { #![macro_use(my_macro)] } 16LL | mod inner { #![macro_use(my_macro)] }
diff --git a/src/test/ui/feature-gates/feature-gate-never_type.stderr b/src/test/ui/feature-gates/feature-gate-never_type.stderr
index d86ab99..2166157 100644
--- a/src/test/ui/feature-gates/feature-gate-never_type.stderr
+++ b/src/test/ui/feature-gates/feature-gate-never_type.stderr
@@ -1,4 +1,4 @@
1error[E0658]: The `!` type is experimental 1error[E0658]: the `!` type is experimental
2 --> $DIR/feature-gate-never_type.rs:7:17 2 --> $DIR/feature-gate-never_type.rs:7:17
3 | 3 |
4LL | type Ma = (u32, !, i32); 4LL | type Ma = (u32, !, i32);
@@ -7,7 +7,7 @@ LL | type Ma = (u32, !, i32);
7 = note: for more information, see https://github.com/rust-lang/rust/issues/35121 7 = note: for more information, see https://github.com/rust-lang/rust/issues/35121
8 = help: add `#![feature(never_type)]` to the crate attributes to enable 8 = help: add `#![feature(never_type)]` to the crate attributes to enable
9 9
10error[E0658]: The `!` type is experimental 10error[E0658]: the `!` type is experimental
11 --> $DIR/feature-gate-never_type.rs:8:20 11 --> $DIR/feature-gate-never_type.rs:8:20
12 | 12 |
13LL | type Meeshka = Vec<!>; 13LL | type Meeshka = Vec<!>;
@@ -16,7 +16,7 @@ LL | type Meeshka = Vec<!>;
16 = note: for more information, see https://github.com/rust-lang/rust/issues/35121 16 = note: for more information, see https://github.com/rust-lang/rust/issues/35121
17 = help: add `#![feature(never_type)]` to the crate attributes to enable 17 = help: add `#![feature(never_type)]` to the crate attributes to enable
18 18
19error[E0658]: The `!` type is experimental 19error[E0658]: the `!` type is experimental
20 --> $DIR/feature-gate-never_type.rs:9:24 20 --> $DIR/feature-gate-never_type.rs:9:24
21 | 21 |
22LL | type Mow = &'static fn(!) -> !; 22LL | type Mow = &'static fn(!) -> !;
@@ -25,7 +25,7 @@ LL | type Mow = &'static fn(!) -> !;
25 = note: for more information, see https://github.com/rust-lang/rust/issues/35121 25 = note: for more information, see https://github.com/rust-lang/rust/issues/35121
26 = help: add `#![feature(never_type)]` to the crate attributes to enable 26 = help: add `#![feature(never_type)]` to the crate attributes to enable
27 27
28error[E0658]: The `!` type is experimental 28error[E0658]: the `!` type is experimental
29 --> $DIR/feature-gate-never_type.rs:10:27 29 --> $DIR/feature-gate-never_type.rs:10:27
30 | 30 |
31LL | type Skwoz = &'static mut !; 31LL | type Skwoz = &'static mut !;
@@ -34,7 +34,7 @@ LL | type Skwoz = &'static mut !;
34 = note: for more information, see https://github.com/rust-lang/rust/issues/35121 34 = note: for more information, see https://github.com/rust-lang/rust/issues/35121
35 = help: add `#![feature(never_type)]` to the crate attributes to enable 35 = help: add `#![feature(never_type)]` to the crate attributes to enable
36 36
37error[E0658]: The `!` type is experimental 37error[E0658]: the `!` type is experimental
38 --> $DIR/feature-gate-never_type.rs:13:16 38 --> $DIR/feature-gate-never_type.rs:13:16
39 | 39 |
40LL | type Wub = !; 40LL | type Wub = !;
diff --git a/src/test/ui/feature-gates/feature-gate-repr128.stderr b/src/test/ui/feature-gates/feature-gate-repr128.stderr
index 2139a5d..e108d74 100644
--- a/src/test/ui/feature-gates/feature-gate-repr128.stderr
+++ b/src/test/ui/feature-gates/feature-gate-repr128.stderr
@@ -6,7 +6,7 @@ LL | | A(u64)
6LL | | } 6LL | | }
7 | |_^ 7 | |_^
8 | 8 |
9 = note: for more information, see https://github.com/rust-lang/rust/issues/35118 9 = note: for more information, see https://github.com/rust-lang/rust/issues/56071
10 = help: add `#![feature(repr128)]` to the crate attributes to enable 10 = help: add `#![feature(repr128)]` to the crate attributes to enable
11 11
12error: aborting due to previous error 12error: aborting due to previous error
diff --git a/src/test/ui/future-incompatible-lint-group.stderr b/src/test/ui/future-incompatible-lint-group.stderr
index 24e3a07..1d958e5 100644
--- a/src/test/ui/future-incompatible-lint-group.stderr
+++ b/src/test/ui/future-incompatible-lint-group.stderr
@@ -2,7 +2,7 @@ error: anonymous parameters are deprecated and will be removed in the next editi
2 --> $DIR/future-incompatible-lint-group.rs:4:10 2 --> $DIR/future-incompatible-lint-group.rs:4:10
3 | 3 |
4LL | fn f(u8) {} 4LL | fn f(u8) {}
5 | ^^ help: Try naming the parameter or explicitly ignoring it: `_: u8` 5 | ^^ help: try naming the parameter or explicitly ignoring it: `_: u8`
6 | 6 |
7note: lint level defined here 7note: lint level defined here
8 --> $DIR/future-incompatible-lint-group.rs:1:9 8 --> $DIR/future-incompatible-lint-group.rs:1:9
diff --git a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.rs b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.rs
index defa0e2..1c0d3b4 100644
--- a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.rs
+++ b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.rs
@@ -1,6 +1,6 @@
1extern crate self; //~ ERROR `extern crate self;` requires renaming 1extern crate self; //~ ERROR `extern crate self;` requires renaming
2 2
3#[macro_use] //~ ERROR `macro_use` is not supported on `extern crate self` 3#[macro_use] //~ ERROR `#[macro_use]` is not supported on `extern crate self`
4extern crate self as foo; 4extern crate self as foo;
5 5
6fn main() {} 6fn main() {}
diff --git a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr
index f26bb2f..8f369f1 100644
--- a/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr
+++ b/src/test/ui/imports/extern-crate-self/extern-crate-self-fail.stderr
@@ -4,7 +4,7 @@ error: `extern crate self;` requires renaming
4LL | extern crate self; 4LL | extern crate self;
5 | ^^^^^^^^^^^^^^^^^^ help: try: `extern crate self as name;` 5 | ^^^^^^^^^^^^^^^^^^ help: try: `extern crate self as name;`
6 6
7error: `macro_use` is not supported on `extern crate self` 7error: `#[macro_use]` is not supported on `extern crate self`
8 --> $DIR/extern-crate-self-fail.rs:3:1 8 --> $DIR/extern-crate-self-fail.rs:3:1
9 | 9 |
10LL | #[macro_use] 10LL | #[macro_use]
diff --git a/src/test/ui/issues/issue-29124.stderr b/src/test/ui/issues/issue-29124.stderr
index fff2024..42d89cd 100644
--- a/src/test/ui/issues/issue-29124.stderr
+++ b/src/test/ui/issues/issue-29124.stderr
@@ -4,7 +4,7 @@ error[E0599]: no method named `x` found for fn item `fn() -> Ret {Obj::func}` in
4LL | Obj::func.x(); 4LL | Obj::func.x();
5 | ^ method not found in `fn() -> Ret {Obj::func}` 5 | ^ method not found in `fn() -> Ret {Obj::func}`
6 | 6 |
7 = note: Obj::func is a function, perhaps you wish to call it 7 = note: `Obj::func` is a function, perhaps you wish to call it
8 8
9error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the current scope 9error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the current scope
10 --> $DIR/issue-29124.rs:17:10 10 --> $DIR/issue-29124.rs:17:10
@@ -12,7 +12,7 @@ error[E0599]: no method named `x` found for fn item `fn() -> Ret {func}` in the
12LL | func.x(); 12LL | func.x();
13 | ^ method not found in `fn() -> Ret {func}` 13 | ^ method not found in `fn() -> Ret {func}`
14 | 14 |
15 = note: func is a function, perhaps you wish to call it 15 = note: `func` is a function, perhaps you wish to call it
16 16
17error: aborting due to 2 previous errors 17error: aborting due to 2 previous errors
18 18
diff --git a/src/test/ui/issues/issue-45730.stderr b/src/test/ui/issues/issue-45730.stderr
index 3c400d6..d4ddba5 100644
--- a/src/test/ui/issues/issue-45730.stderr
+++ b/src/test/ui/issues/issue-45730.stderr
@@ -6,7 +6,7 @@ LL | let x: *const _ = 0 as _;
6 | | 6 | |
7 | help: consider giving more type information 7 | help: consider giving more type information
8 | 8 |
9 = note: The type information given here is insufficient to check whether the pointer cast is valid 9 = note: the type information given here is insufficient to check whether the pointer cast is valid
10 10
11error[E0641]: cannot cast to a pointer of an unknown kind 11error[E0641]: cannot cast to a pointer of an unknown kind
12 --> $DIR/issue-45730.rs:5:23 12 --> $DIR/issue-45730.rs:5:23
@@ -16,7 +16,7 @@ LL | let x: *const _ = 0 as *const _;
16 | | 16 | |
17 | help: consider giving more type information 17 | help: consider giving more type information
18 | 18 |
19 = note: The type information given here is insufficient to check whether the pointer cast is valid 19 = note: the type information given here is insufficient to check whether the pointer cast is valid
20 20
21error[E0641]: cannot cast to a pointer of an unknown kind 21error[E0641]: cannot cast to a pointer of an unknown kind
22 --> $DIR/issue-45730.rs:8:13 22 --> $DIR/issue-45730.rs:8:13
@@ -26,7 +26,7 @@ LL | let x = 0 as *const i32 as *const _ as *mut _;
26 | | 26 | |
27 | help: consider giving more type information 27 | help: consider giving more type information
28 | 28 |
29 = note: The type information given here is insufficient to check whether the pointer cast is valid 29 = note: the type information given here is insufficient to check whether the pointer cast is valid
30 30
31error: aborting due to 3 previous errors 31error: aborting due to 3 previous errors
32 32
diff --git a/src/test/ui/issues/issue-57362-1.stderr b/src/test/ui/issues/issue-57362-1.stderr
index e762b7b..ad596db 100644
--- a/src/test/ui/issues/issue-57362-1.stderr
+++ b/src/test/ui/issues/issue-57362-1.stderr
@@ -4,7 +4,7 @@ error[E0599]: no method named `f` found for fn pointer `fn(&u8)` in the current
4LL | a.f(); 4LL | a.f();
5 | ^ method not found in `fn(&u8)` 5 | ^ method not found in `fn(&u8)`
6 | 6 |
7 = note: a is a function, perhaps you wish to call it 7 = note: `a` is a function, perhaps you wish to call it
8 = help: items from traits can only be used if the trait is implemented and in scope 8 = help: items from traits can only be used if the trait is implemented and in scope
9 = note: the following trait defines an item `f`, perhaps you need to implement it: 9 = note: the following trait defines an item `f`, perhaps you need to implement it:
10 candidate #1: `Trait` 10 candidate #1: `Trait`
diff --git a/src/test/ui/keyword/keyword-super-as-identifier.rs b/src/test/ui/keyword/keyword-super-as-identifier.rs
index d728b4f..02c1b27 100644
--- a/src/test/ui/keyword/keyword-super-as-identifier.rs
+++ b/src/test/ui/keyword/keyword-super-as-identifier.rs
@@ -1,3 +1,3 @@
1fn main() { 1fn main() {
2 let super = 22; //~ ERROR failed to resolve: there are too many initial `super`s 2 let super = 22; //~ ERROR failed to resolve: there are too many leading `super` keywords
3} 3}
diff --git a/src/test/ui/keyword/keyword-super-as-identifier.stderr b/src/test/ui/keyword/keyword-super-as-identifier.stderr
index bbeaed9..1f64f3b 100644
--- a/src/test/ui/keyword/keyword-super-as-identifier.stderr
+++ b/src/test/ui/keyword/keyword-super-as-identifier.stderr
@@ -1,8 +1,8 @@
1error[E0433]: failed to resolve: there are too many initial `super`s. 1error[E0433]: failed to resolve: there are too many leading `super` keywords
2 --> $DIR/keyword-super-as-identifier.rs:2:9 2 --> $DIR/keyword-super-as-identifier.rs:2:9
3 | 3 |
4LL | let super = 22; 4LL | let super = 22;
5 | ^^^^^ there are too many initial `super`s. 5 | ^^^^^ there are too many leading `super` keywords
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/keyword/keyword-super.rs b/src/test/ui/keyword/keyword-super.rs
index a43e1e3..c121a6c 100644
--- a/src/test/ui/keyword/keyword-super.rs
+++ b/src/test/ui/keyword/keyword-super.rs
@@ -1,3 +1,3 @@
1fn main() { 1fn main() {
2 let super: isize; //~ ERROR failed to resolve: there are too many initial `super`s 2 let super: isize; //~ ERROR failed to resolve: there are too many leading `super` keywords
3} 3}
diff --git a/src/test/ui/keyword/keyword-super.stderr b/src/test/ui/keyword/keyword-super.stderr
index 63394c7..0e0d67c 100644
--- a/src/test/ui/keyword/keyword-super.stderr
+++ b/src/test/ui/keyword/keyword-super.stderr
@@ -1,8 +1,8 @@
1error[E0433]: failed to resolve: there are too many initial `super`s. 1error[E0433]: failed to resolve: there are too many leading `super` keywords
2 --> $DIR/keyword-super.rs:2:9 2 --> $DIR/keyword-super.rs:2:9
3 | 3 |
4LL | let super: isize; 4LL | let super: isize;
5 | ^^^^^ there are too many initial `super`s. 5 | ^^^^^ there are too many leading `super` keywords
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/lint/uninitialized-zeroed.stderr b/src/test/ui/lint/uninitialized-zeroed.stderr
index bdb5959..169e77c 100644
--- a/src/test/ui/lint/uninitialized-zeroed.stderr
+++ b/src/test/ui/lint/uninitialized-zeroed.stderr
@@ -12,7 +12,7 @@ note: lint level defined here
12 | 12 |
13LL | #![deny(invalid_value)] 13LL | #![deny(invalid_value)]
14 | ^^^^^^^^^^^^^ 14 | ^^^^^^^^^^^^^
15 = note: References must be non-null 15 = note: references must be non-null
16 16
17error: the type `&'static T` does not permit being left uninitialized 17error: the type `&'static T` does not permit being left uninitialized
18 --> $DIR/uninitialized-zeroed.rs:30:32 18 --> $DIR/uninitialized-zeroed.rs:30:32
@@ -23,7 +23,7 @@ LL | let _val: &'static T = mem::uninitialized();
23 | this code causes undefined behavior when executed 23 | this code causes undefined behavior when executed
24 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 24 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
25 | 25 |
26 = note: References must be non-null 26 = note: references must be non-null
27 27
28error: the type `Wrap<&'static T>` does not permit zero-initialization 28error: the type `Wrap<&'static T>` does not permit zero-initialization
29 --> $DIR/uninitialized-zeroed.rs:32:38 29 --> $DIR/uninitialized-zeroed.rs:32:38
@@ -34,7 +34,7 @@ LL | let _val: Wrap<&'static T> = mem::zeroed();
34 | this code causes undefined behavior when executed 34 | this code causes undefined behavior when executed
35 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 35 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
36 | 36 |
37note: References must be non-null (in this struct field) 37note: references must be non-null (in this struct field)
38 --> $DIR/uninitialized-zeroed.rs:18:18 38 --> $DIR/uninitialized-zeroed.rs:18:18
39 | 39 |
40LL | struct Wrap<T> { wrapped: T } 40LL | struct Wrap<T> { wrapped: T }
@@ -49,7 +49,7 @@ LL | let _val: Wrap<&'static T> = mem::uninitialized();
49 | this code causes undefined behavior when executed 49 | this code causes undefined behavior when executed
50 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 50 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
51 | 51 |
52note: References must be non-null (in this struct field) 52note: references must be non-null (in this struct field)
53 --> $DIR/uninitialized-zeroed.rs:18:18 53 --> $DIR/uninitialized-zeroed.rs:18:18
54 | 54 |
55LL | struct Wrap<T> { wrapped: T } 55LL | struct Wrap<T> { wrapped: T }
@@ -64,7 +64,7 @@ LL | let _val: ! = mem::zeroed();
64 | this code causes undefined behavior when executed 64 | this code causes undefined behavior when executed
65 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 65 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
66 | 66 |
67 = note: The never type (`!`) has no valid value 67 = note: the `!` type has no valid value
68 68
69error: the type `!` does not permit being left uninitialized 69error: the type `!` does not permit being left uninitialized
70 --> $DIR/uninitialized-zeroed.rs:41:23 70 --> $DIR/uninitialized-zeroed.rs:41:23
@@ -75,7 +75,7 @@ LL | let _val: ! = mem::uninitialized();
75 | this code causes undefined behavior when executed 75 | this code causes undefined behavior when executed
76 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 76 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
77 | 77 |
78 = note: The never type (`!`) has no valid value 78 = note: the `!` type has no valid value
79 79
80error: the type `(i32, !)` does not permit zero-initialization 80error: the type `(i32, !)` does not permit zero-initialization
81 --> $DIR/uninitialized-zeroed.rs:43:30 81 --> $DIR/uninitialized-zeroed.rs:43:30
@@ -86,7 +86,7 @@ LL | let _val: (i32, !) = mem::zeroed();
86 | this code causes undefined behavior when executed 86 | this code causes undefined behavior when executed
87 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 87 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
88 | 88 |
89 = note: The never type (`!`) has no valid value 89 = note: the `!` type has no valid value
90 90
91error: the type `(i32, !)` does not permit being left uninitialized 91error: the type `(i32, !)` does not permit being left uninitialized
92 --> $DIR/uninitialized-zeroed.rs:44:30 92 --> $DIR/uninitialized-zeroed.rs:44:30
@@ -97,7 +97,7 @@ LL | let _val: (i32, !) = mem::uninitialized();
97 | this code causes undefined behavior when executed 97 | this code causes undefined behavior when executed
98 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 98 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
99 | 99 |
100 = note: The never type (`!`) has no valid value 100 = note: the `!` type has no valid value
101 101
102error: the type `Void` does not permit zero-initialization 102error: the type `Void` does not permit zero-initialization
103 --> $DIR/uninitialized-zeroed.rs:46:26 103 --> $DIR/uninitialized-zeroed.rs:46:26
@@ -108,7 +108,7 @@ LL | let _val: Void = mem::zeroed();
108 | this code causes undefined behavior when executed 108 | this code causes undefined behavior when executed
109 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 109 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
110 | 110 |
111 = note: 0-variant enums have no valid value 111 = note: enums with no variants have no valid value
112 112
113error: the type `Void` does not permit being left uninitialized 113error: the type `Void` does not permit being left uninitialized
114 --> $DIR/uninitialized-zeroed.rs:47:26 114 --> $DIR/uninitialized-zeroed.rs:47:26
@@ -119,7 +119,7 @@ LL | let _val: Void = mem::uninitialized();
119 | this code causes undefined behavior when executed 119 | this code causes undefined behavior when executed
120 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 120 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
121 | 121 |
122 = note: 0-variant enums have no valid value 122 = note: enums with no variants have no valid value
123 123
124error: the type `&'static i32` does not permit zero-initialization 124error: the type `&'static i32` does not permit zero-initialization
125 --> $DIR/uninitialized-zeroed.rs:49:34 125 --> $DIR/uninitialized-zeroed.rs:49:34
@@ -130,7 +130,7 @@ LL | let _val: &'static i32 = mem::zeroed();
130 | this code causes undefined behavior when executed 130 | this code causes undefined behavior when executed
131 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 131 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
132 | 132 |
133 = note: References must be non-null 133 = note: references must be non-null
134 134
135error: the type `&'static i32` does not permit being left uninitialized 135error: the type `&'static i32` does not permit being left uninitialized
136 --> $DIR/uninitialized-zeroed.rs:50:34 136 --> $DIR/uninitialized-zeroed.rs:50:34
@@ -141,7 +141,7 @@ LL | let _val: &'static i32 = mem::uninitialized();
141 | this code causes undefined behavior when executed 141 | this code causes undefined behavior when executed
142 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 142 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
143 | 143 |
144 = note: References must be non-null 144 = note: references must be non-null
145 145
146error: the type `Ref` does not permit zero-initialization 146error: the type `Ref` does not permit zero-initialization
147 --> $DIR/uninitialized-zeroed.rs:52:25 147 --> $DIR/uninitialized-zeroed.rs:52:25
@@ -152,7 +152,7 @@ LL | let _val: Ref = mem::zeroed();
152 | this code causes undefined behavior when executed 152 | this code causes undefined behavior when executed
153 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 153 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
154 | 154 |
155note: References must be non-null (in this struct field) 155note: references must be non-null (in this struct field)
156 --> $DIR/uninitialized-zeroed.rs:15:12 156 --> $DIR/uninitialized-zeroed.rs:15:12
157 | 157 |
158LL | struct Ref(&'static i32); 158LL | struct Ref(&'static i32);
@@ -167,7 +167,7 @@ LL | let _val: Ref = mem::uninitialized();
167 | this code causes undefined behavior when executed 167 | this code causes undefined behavior when executed
168 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 168 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
169 | 169 |
170note: References must be non-null (in this struct field) 170note: references must be non-null (in this struct field)
171 --> $DIR/uninitialized-zeroed.rs:15:12 171 --> $DIR/uninitialized-zeroed.rs:15:12
172 | 172 |
173LL | struct Ref(&'static i32); 173LL | struct Ref(&'static i32);
@@ -182,7 +182,7 @@ LL | let _val: fn() = mem::zeroed();
182 | this code causes undefined behavior when executed 182 | this code causes undefined behavior when executed
183 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 183 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
184 | 184 |
185 = note: Function pointers must be non-null 185 = note: function pointers must be non-null
186 186
187error: the type `fn()` does not permit being left uninitialized 187error: the type `fn()` does not permit being left uninitialized
188 --> $DIR/uninitialized-zeroed.rs:56:26 188 --> $DIR/uninitialized-zeroed.rs:56:26
@@ -193,7 +193,7 @@ LL | let _val: fn() = mem::uninitialized();
193 | this code causes undefined behavior when executed 193 | this code causes undefined behavior when executed
194 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 194 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
195 | 195 |
196 = note: Function pointers must be non-null 196 = note: function pointers must be non-null
197 197
198error: the type `Wrap<fn()>` does not permit zero-initialization 198error: the type `Wrap<fn()>` does not permit zero-initialization
199 --> $DIR/uninitialized-zeroed.rs:58:32 199 --> $DIR/uninitialized-zeroed.rs:58:32
@@ -204,7 +204,7 @@ LL | let _val: Wrap<fn()> = mem::zeroed();
204 | this code causes undefined behavior when executed 204 | this code causes undefined behavior when executed
205 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 205 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
206 | 206 |
207note: Function pointers must be non-null (in this struct field) 207note: function pointers must be non-null (in this struct field)
208 --> $DIR/uninitialized-zeroed.rs:18:18 208 --> $DIR/uninitialized-zeroed.rs:18:18
209 | 209 |
210LL | struct Wrap<T> { wrapped: T } 210LL | struct Wrap<T> { wrapped: T }
@@ -219,7 +219,7 @@ LL | let _val: Wrap<fn()> = mem::uninitialized();
219 | this code causes undefined behavior when executed 219 | this code causes undefined behavior when executed
220 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 220 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
221 | 221 |
222note: Function pointers must be non-null (in this struct field) 222note: function pointers must be non-null (in this struct field)
223 --> $DIR/uninitialized-zeroed.rs:18:18 223 --> $DIR/uninitialized-zeroed.rs:18:18
224 | 224 |
225LL | struct Wrap<T> { wrapped: T } 225LL | struct Wrap<T> { wrapped: T }
@@ -234,7 +234,7 @@ LL | let _val: WrapEnum<fn()> = mem::zeroed();
234 | this code causes undefined behavior when executed 234 | this code causes undefined behavior when executed
235 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 235 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
236 | 236 |
237note: Function pointers must be non-null (in this enum field) 237note: function pointers must be non-null (in this enum field)
238 --> $DIR/uninitialized-zeroed.rs:19:28 238 --> $DIR/uninitialized-zeroed.rs:19:28
239 | 239 |
240LL | enum WrapEnum<T> { Wrapped(T) } 240LL | enum WrapEnum<T> { Wrapped(T) }
@@ -249,7 +249,7 @@ LL | let _val: WrapEnum<fn()> = mem::uninitialized();
249 | this code causes undefined behavior when executed 249 | this code causes undefined behavior when executed
250 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 250 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
251 | 251 |
252note: Function pointers must be non-null (in this enum field) 252note: function pointers must be non-null (in this enum field)
253 --> $DIR/uninitialized-zeroed.rs:19:28 253 --> $DIR/uninitialized-zeroed.rs:19:28
254 | 254 |
255LL | enum WrapEnum<T> { Wrapped(T) } 255LL | enum WrapEnum<T> { Wrapped(T) }
@@ -264,7 +264,7 @@ LL | let _val: Wrap<(RefPair, i32)> = mem::zeroed();
264 | this code causes undefined behavior when executed 264 | this code causes undefined behavior when executed
265 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 265 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
266 | 266 |
267note: References must be non-null (in this struct field) 267note: references must be non-null (in this struct field)
268 --> $DIR/uninitialized-zeroed.rs:16:16 268 --> $DIR/uninitialized-zeroed.rs:16:16
269 | 269 |
270LL | struct RefPair((&'static i32, i32)); 270LL | struct RefPair((&'static i32, i32));
@@ -279,7 +279,7 @@ LL | let _val: Wrap<(RefPair, i32)> = mem::uninitialized();
279 | this code causes undefined behavior when executed 279 | this code causes undefined behavior when executed
280 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 280 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
281 | 281 |
282note: References must be non-null (in this struct field) 282note: references must be non-null (in this struct field)
283 --> $DIR/uninitialized-zeroed.rs:16:16 283 --> $DIR/uninitialized-zeroed.rs:16:16
284 | 284 |
285LL | struct RefPair((&'static i32, i32)); 285LL | struct RefPair((&'static i32, i32));
@@ -294,7 +294,7 @@ LL | let _val: NonNull<i32> = mem::zeroed();
294 | this code causes undefined behavior when executed 294 | this code causes undefined behavior when executed
295 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 295 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
296 | 296 |
297 = note: std::ptr::NonNull<i32> must be non-null 297 = note: `std::ptr::NonNull<i32>` must be non-null
298 298
299error: the type `std::ptr::NonNull<i32>` does not permit being left uninitialized 299error: the type `std::ptr::NonNull<i32>` does not permit being left uninitialized
300 --> $DIR/uninitialized-zeroed.rs:68:34 300 --> $DIR/uninitialized-zeroed.rs:68:34
@@ -305,7 +305,7 @@ LL | let _val: NonNull<i32> = mem::uninitialized();
305 | this code causes undefined behavior when executed 305 | this code causes undefined behavior when executed
306 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 306 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
307 | 307 |
308 = note: std::ptr::NonNull<i32> must be non-null 308 = note: `std::ptr::NonNull<i32>` must be non-null
309 309
310error: the type `*const dyn std::marker::Send` does not permit zero-initialization 310error: the type `*const dyn std::marker::Send` does not permit zero-initialization
311 --> $DIR/uninitialized-zeroed.rs:70:37 311 --> $DIR/uninitialized-zeroed.rs:70:37
@@ -316,7 +316,7 @@ LL | let _val: *const dyn Send = mem::zeroed();
316 | this code causes undefined behavior when executed 316 | this code causes undefined behavior when executed
317 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 317 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
318 | 318 |
319 = note: The vtable of a wide raw pointer must be non-null 319 = note: the vtable of a wide raw pointer must be non-null
320 320
321error: the type `*const dyn std::marker::Send` does not permit being left uninitialized 321error: the type `*const dyn std::marker::Send` does not permit being left uninitialized
322 --> $DIR/uninitialized-zeroed.rs:71:37 322 --> $DIR/uninitialized-zeroed.rs:71:37
@@ -327,7 +327,7 @@ LL | let _val: *const dyn Send = mem::uninitialized();
327 | this code causes undefined behavior when executed 327 | this code causes undefined behavior when executed
328 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 328 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
329 | 329 |
330 = note: The vtable of a wide raw pointer must be non-null 330 = note: the vtable of a wide raw pointer must be non-null
331 331
332error: the type `bool` does not permit being left uninitialized 332error: the type `bool` does not permit being left uninitialized
333 --> $DIR/uninitialized-zeroed.rs:75:26 333 --> $DIR/uninitialized-zeroed.rs:75:26
@@ -338,7 +338,7 @@ LL | let _val: bool = mem::uninitialized();
338 | this code causes undefined behavior when executed 338 | this code causes undefined behavior when executed
339 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 339 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
340 | 340 |
341 = note: Booleans must be `true` or `false` 341 = note: booleans must be either `true` or `false`
342 342
343error: the type `Wrap<char>` does not permit being left uninitialized 343error: the type `Wrap<char>` does not permit being left uninitialized
344 --> $DIR/uninitialized-zeroed.rs:78:32 344 --> $DIR/uninitialized-zeroed.rs:78:32
@@ -349,7 +349,7 @@ LL | let _val: Wrap<char> = mem::uninitialized();
349 | this code causes undefined behavior when executed 349 | this code causes undefined behavior when executed
350 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 350 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
351 | 351 |
352note: Characters must be a valid unicode codepoint (in this struct field) 352note: characters must be a valid Unicode codepoint (in this struct field)
353 --> $DIR/uninitialized-zeroed.rs:18:18 353 --> $DIR/uninitialized-zeroed.rs:18:18
354 | 354 |
355LL | struct Wrap<T> { wrapped: T } 355LL | struct Wrap<T> { wrapped: T }
@@ -364,7 +364,7 @@ LL | let _val: NonBig = mem::uninitialized();
364 | this code causes undefined behavior when executed 364 | this code causes undefined behavior when executed
365 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 365 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
366 | 366 |
367 = note: NonBig must be initialized inside its custom valid range 367 = note: `NonBig` must be initialized inside its custom valid range
368 368
369error: the type `&'static i32` does not permit zero-initialization 369error: the type `&'static i32` does not permit zero-initialization
370 --> $DIR/uninitialized-zeroed.rs:84:34 370 --> $DIR/uninitialized-zeroed.rs:84:34
@@ -375,7 +375,7 @@ LL | let _val: &'static i32 = mem::transmute(0usize);
375 | this code causes undefined behavior when executed 375 | this code causes undefined behavior when executed
376 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 376 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
377 | 377 |
378 = note: References must be non-null 378 = note: references must be non-null
379 379
380error: the type `&'static [i32]` does not permit zero-initialization 380error: the type `&'static [i32]` does not permit zero-initialization
381 --> $DIR/uninitialized-zeroed.rs:85:36 381 --> $DIR/uninitialized-zeroed.rs:85:36
@@ -386,7 +386,7 @@ LL | let _val: &'static [i32] = mem::transmute((0usize, 0usize));
386 | this code causes undefined behavior when executed 386 | this code causes undefined behavior when executed
387 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 387 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
388 | 388 |
389 = note: References must be non-null 389 = note: references must be non-null
390 390
391error: the type `std::num::NonZeroU32` does not permit zero-initialization 391error: the type `std::num::NonZeroU32` does not permit zero-initialization
392 --> $DIR/uninitialized-zeroed.rs:86:32 392 --> $DIR/uninitialized-zeroed.rs:86:32
@@ -397,7 +397,7 @@ LL | let _val: NonZeroU32 = mem::transmute(0);
397 | this code causes undefined behavior when executed 397 | this code causes undefined behavior when executed
398 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 398 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
399 | 399 |
400 = note: std::num::NonZeroU32 must be non-null 400 = note: `std::num::NonZeroU32` must be non-null
401 401
402error: the type `std::ptr::NonNull<i32>` does not permit zero-initialization 402error: the type `std::ptr::NonNull<i32>` does not permit zero-initialization
403 --> $DIR/uninitialized-zeroed.rs:89:34 403 --> $DIR/uninitialized-zeroed.rs:89:34
@@ -408,7 +408,7 @@ LL | let _val: NonNull<i32> = MaybeUninit::zeroed().assume_init();
408 | this code causes undefined behavior when executed 408 | this code causes undefined behavior when executed
409 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 409 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
410 | 410 |
411 = note: std::ptr::NonNull<i32> must be non-null 411 = note: `std::ptr::NonNull<i32>` must be non-null
412 412
413error: the type `std::ptr::NonNull<i32>` does not permit being left uninitialized 413error: the type `std::ptr::NonNull<i32>` does not permit being left uninitialized
414 --> $DIR/uninitialized-zeroed.rs:90:34 414 --> $DIR/uninitialized-zeroed.rs:90:34
@@ -419,7 +419,7 @@ LL | let _val: NonNull<i32> = MaybeUninit::uninit().assume_init();
419 | this code causes undefined behavior when executed 419 | this code causes undefined behavior when executed
420 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 420 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
421 | 421 |
422 = note: std::ptr::NonNull<i32> must be non-null 422 = note: `std::ptr::NonNull<i32>` must be non-null
423 423
424error: the type `bool` does not permit being left uninitialized 424error: the type `bool` does not permit being left uninitialized
425 --> $DIR/uninitialized-zeroed.rs:91:26 425 --> $DIR/uninitialized-zeroed.rs:91:26
@@ -430,7 +430,7 @@ LL | let _val: bool = MaybeUninit::uninit().assume_init();
430 | this code causes undefined behavior when executed 430 | this code causes undefined behavior when executed
431 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done 431 | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
432 | 432 |
433 = note: Booleans must be `true` or `false` 433 = note: booleans must be either `true` or `false`
434 434
435error: aborting due to 35 previous errors 435error: aborting due to 35 previous errors
436 436
diff --git a/src/test/ui/malformed/malformed-interpolated.stderr b/src/test/ui/malformed/malformed-interpolated.stderr
index bcd2ef5..6f6ad45 100644
--- a/src/test/ui/malformed/malformed-interpolated.stderr
+++ b/src/test/ui/malformed/malformed-interpolated.stderr
@@ -4,7 +4,7 @@ error: suffixed literals are not allowed in attributes
4LL | check!(0u8); 4LL | check!(0u8);
5 | ^^^ 5 | ^^^
6 | 6 |
7 = help: instead of using a suffixed literal (1u8, 1.0f32, etc.), use an unsuffixed version (1, 1.0, etc.). 7 = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
8 8
9error: unexpected token: `-0` 9error: unexpected token: `-0`
10 --> $DIR/malformed-interpolated.rs:5:25 10 --> $DIR/malformed-interpolated.rs:5:25
diff --git a/src/test/ui/module-macro_use-arguments.rs b/src/test/ui/module-macro_use-arguments.rs
index 6627b48..121b492 100644
--- a/src/test/ui/module-macro_use-arguments.rs
+++ b/src/test/ui/module-macro_use-arguments.rs
@@ -1,4 +1,4 @@
1#[macro_use(foo, bar)] //~ ERROR arguments to macro_use are not allowed here 1#[macro_use(foo, bar)] //~ ERROR arguments to `macro_use` are not allowed here
2mod foo { 2mod foo {
3} 3}
4 4
diff --git a/src/test/ui/module-macro_use-arguments.stderr b/src/test/ui/module-macro_use-arguments.stderr
index 2a75736..af799cb 100644
--- a/src/test/ui/module-macro_use-arguments.stderr
+++ b/src/test/ui/module-macro_use-arguments.stderr
@@ -1,4 +1,4 @@
1error: arguments to macro_use are not allowed here 1error: arguments to `macro_use` are not allowed here
2 --> $DIR/module-macro_use-arguments.rs:1:1 2 --> $DIR/module-macro_use-arguments.rs:1:1
3 | 3 |
4LL | #[macro_use(foo, bar)] 4LL | #[macro_use(foo, bar)]
diff --git a/src/test/ui/multi-panic.rs b/src/test/ui/multi-panic.rs
index e4b41e4..0f8bddf 100644
--- a/src/test/ui/multi-panic.rs
+++ b/src/test/ui/multi-panic.rs
@@ -10,7 +10,7 @@ fn check_for_no_backtrace(test: std::process::Output) {
10 10
11 assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked at")), Some(true)); 11 assert_eq!(it.next().map(|l| l.starts_with("thread '<unnamed>' panicked at")), Some(true));
12 assert_eq!(it.next(), Some("note: run with `RUST_BACKTRACE=1` \ 12 assert_eq!(it.next(), Some("note: run with `RUST_BACKTRACE=1` \
13 environment variable to display a backtrace.")); 13 environment variable to display a backtrace"));
14 assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true)); 14 assert_eq!(it.next().map(|l| l.starts_with("thread 'main' panicked at")), Some(true));
15 assert_eq!(it.next(), None); 15 assert_eq!(it.next(), None);
16} 16}
diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
index 3d79ff0..b4e18c2 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/escape-argument-callee.rs:26:38 2 --> $DIR/escape-argument-callee.rs:26:38
3 | 3 |
4LL | let mut closure = expect_sig(|p, y| *p = y); 4LL | let mut closure = expect_sig(|p, y| *p = y);
@@ -18,7 +18,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
18 | | has type `&'1 i32` 18 | | has type `&'1 i32`
19 | has type `&'_#2r mut &'2 i32` 19 | has type `&'_#2r mut &'2 i32`
20 20
21note: No external requirements 21note: no external requirements
22 --> $DIR/escape-argument-callee.rs:20:1 22 --> $DIR/escape-argument-callee.rs:20:1
23 | 23 |
24LL | / fn test() { 24LL | / fn test() {
diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr
index 37f04af..533a17b 100644
--- a/src/test/ui/nll/closure-requirements/escape-argument.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/escape-argument.rs:26:38 2 --> $DIR/escape-argument.rs:26:38
3 | 3 |
4LL | let mut closure = expect_sig(|p, y| *p = y); 4LL | let mut closure = expect_sig(|p, y| *p = y);
@@ -9,7 +9,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
9 for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) mut &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32, &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32)), 9 for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) mut &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32, &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32)),
10 ] 10 ]
11 11
12note: No external requirements 12note: no external requirements
13 --> $DIR/escape-argument.rs:20:1 13 --> $DIR/escape-argument.rs:20:1
14 | 14 |
15LL | / fn test() { 15LL | / fn test() {
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
index 810c028..60d0206 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/escape-upvar-nested.rs:21:32 2 --> $DIR/escape-upvar-nested.rs:21:32
3 | 3 |
4LL | let mut closure1 = || p = &y; 4LL | let mut closure1 = || p = &y;
@@ -13,7 +13,7 @@ LL | let mut closure1 = || p = &y;
13 = note: number of external vids: 4 13 = note: number of external vids: 4
14 = note: where '_#1r: '_#3r 14 = note: where '_#1r: '_#3r
15 15
16note: External requirements 16note: external requirements
17 --> $DIR/escape-upvar-nested.rs:20:27 17 --> $DIR/escape-upvar-nested.rs:20:27
18 | 18 |
19LL | let mut closure = || { 19LL | let mut closure = || {
@@ -32,7 +32,7 @@ LL | | };
32 = note: number of external vids: 4 32 = note: number of external vids: 4
33 = note: where '_#1r: '_#3r 33 = note: where '_#1r: '_#3r
34 34
35note: No external requirements 35note: no external requirements
36 --> $DIR/escape-upvar-nested.rs:13:1 36 --> $DIR/escape-upvar-nested.rs:13:1
37 | 37 |
38LL | / fn test() { 38LL | / fn test() {
diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
index bf04276..f64ccf1 100644
--- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
+++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/escape-upvar-ref.rs:23:27 2 --> $DIR/escape-upvar-ref.rs:23:27
3 | 3 |
4LL | let mut closure = || p = &y; 4LL | let mut closure = || p = &y;
@@ -13,7 +13,7 @@ LL | let mut closure = || p = &y;
13 = note: number of external vids: 4 13 = note: number of external vids: 4
14 = note: where '_#1r: '_#3r 14 = note: where '_#1r: '_#3r
15 15
16note: No external requirements 16note: no external requirements
17 --> $DIR/escape-upvar-ref.rs:17:1 17 --> $DIR/escape-upvar-ref.rs:17:1
18 | 18 |
19LL | / fn test() { 19LL | / fn test() {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index 4e3aa35..e1e0cdc 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/propagate-approximated-fail-no-postdom.rs:43:9 2 --> $DIR/propagate-approximated-fail-no-postdom.rs:43:9
3 | 3 |
4LL | / |_outlives1, _outlives2, _outlives3, x, y| { 4LL | / |_outlives1, _outlives2, _outlives3, x, y| {
@@ -27,7 +27,7 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| {
27LL | demand_y(x, y, p) 27LL | demand_y(x, y, p)
28 | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` 28 | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
29 29
30note: No external requirements 30note: no external requirements
31 --> $DIR/propagate-approximated-fail-no-postdom.rs:38:1 31 --> $DIR/propagate-approximated-fail-no-postdom.rs:38:1
32 | 32 |
33LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) { 33LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index cd61b8b..b653502 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-approximated-ref.rs:43:47 2 --> $DIR/propagate-approximated-ref.rs:43:47
3 | 3 |
4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
@@ -18,7 +18,7 @@ LL | | });
18 = note: number of external vids: 5 18 = note: number of external vids: 5
19 = note: where '_#1r: '_#2r 19 = note: where '_#1r: '_#2r
20 20
21note: No external requirements 21note: no external requirements
22 --> $DIR/propagate-approximated-ref.rs:42:1 22 --> $DIR/propagate-approximated-ref.rs:42:1
23 | 23 |
24LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 24LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
index 259140c..708e50d 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15 2 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15
3 | 3 |
4LL | foo(cell, |cell_a, cell_x| { 4LL | foo(cell, |cell_a, cell_x| {
@@ -23,7 +23,7 @@ LL | foo(cell, |cell_a, cell_x| {
23LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure 23LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
24 | ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here 24 | ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here
25 25
26note: No external requirements 26note: no external requirements
27 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1 27 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
28 | 28 |
29LL | / fn case1() { 29LL | / fn case1() {
@@ -37,7 +37,7 @@ LL | | }
37 | 37 |
38 = note: defining type: case1 38 = note: defining type: case1
39 39
40note: External requirements 40note: external requirements
41 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15 41 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
42 | 42 |
43LL | foo(cell, |cell_a, cell_x| { 43LL | foo(cell, |cell_a, cell_x| {
@@ -53,7 +53,7 @@ LL | | })
53 = note: number of external vids: 2 53 = note: number of external vids: 2
54 = note: where '_#1r: '_#0r 54 = note: where '_#1r: '_#0r
55 55
56note: No external requirements 56note: no external requirements
57 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1 57 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
58 | 58 |
59LL | / fn case2() { 59LL | / fn case2() {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
index b3dd682..17d33e8 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47 2 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47
3 | 3 |
4LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 4LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
@@ -19,7 +19,7 @@ LL | | });
19 = note: number of external vids: 4 19 = note: number of external vids: 4
20 = note: where '_#1r: '_#0r 20 = note: where '_#1r: '_#0r
21 21
22note: No external requirements 22note: no external requirements
23 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1 23 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1
24 | 24 |
25LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 25LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
index ab12d08..5dce8d0 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47 2 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47
3 | 3 |
4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
@@ -19,7 +19,7 @@ LL | | });
19 = note: number of external vids: 5 19 = note: number of external vids: 5
20 = note: where '_#1r: '_#0r 20 = note: where '_#1r: '_#0r
21 21
22note: No external requirements 22note: no external requirements
23 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1 23 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1
24 | 24 |
25LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 25LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
index b2209e9..5c5d510 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-approximated-val.rs:36:45 2 --> $DIR/propagate-approximated-val.rs:36:45
3 | 3 |
4LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { 4LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
@@ -18,7 +18,7 @@ LL | | });
18 = note: number of external vids: 5 18 = note: number of external vids: 5
19 = note: where '_#1r: '_#2r 19 = note: where '_#1r: '_#2r
20 20
21note: No external requirements 21note: no external requirements
22 --> $DIR/propagate-approximated-val.rs:35:1 22 --> $DIR/propagate-approximated-val.rs:35:1
23 | 23 |
24LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 24LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
index 55ee515..c111e65 100644
--- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-despite-same-free-region.rs:42:9 2 --> $DIR/propagate-despite-same-free-region.rs:42:9
3 | 3 |
4LL | / |_outlives1, _outlives2, x, y| { 4LL | / |_outlives1, _outlives2, x, y| {
@@ -16,7 +16,7 @@ LL | | },
16 = note: number of external vids: 4 16 = note: number of external vids: 4
17 = note: where '_#1r: '_#2r 17 = note: where '_#1r: '_#2r
18 18
19note: No external requirements 19note: no external requirements
20 --> $DIR/propagate-despite-same-free-region.rs:39:1 20 --> $DIR/propagate-despite-same-free-region.rs:39:1
21 | 21 |
22LL | / fn supply<'a>(cell_a: Cell<&'a u32>) { 22LL | / fn supply<'a>(cell_a: Cell<&'a u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
index 1c29af8..52df46e 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:35:47 2 --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:35:47
3 | 3 |
4LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 4LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
@@ -27,7 +27,7 @@ LL | // Only works if 'x: 'y:
27LL | demand_y(x, y, x.get()) 27LL | demand_y(x, y, x.get())
28 | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` 28 | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
29 29
30note: No external requirements 30note: no external requirements
31 --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:34:1 31 --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:34:1
32 | 32 |
33LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 33LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
index afa0e9f..0270cc4 100644
--- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:39:47 2 --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:39:47
3 | 3 |
4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
@@ -27,7 +27,7 @@ LL | // Only works if 'x: 'y:
27LL | demand_y(x, y, x.get()) 27LL | demand_y(x, y, x.get())
28 | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` 28 | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
29 29
30note: No external requirements 30note: no external requirements
31 --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:38:1 31 --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:38:1
32 | 32 |
33LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 33LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
index 0dbb530..5317bb6 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/propagate-from-trait-match.rs:32:36 2 --> $DIR/propagate-from-trait-match.rs:32:36
3 | 3 |
4LL | establish_relationships(value, |value| { 4LL | establish_relationships(value, |value| {
@@ -18,7 +18,7 @@ LL | | });
18 = note: number of external vids: 2 18 = note: number of external vids: 2
19 = note: where T: '_#1r 19 = note: where T: '_#1r
20 20
21note: No external requirements 21note: no external requirements
22 --> $DIR/propagate-from-trait-match.rs:28:1 22 --> $DIR/propagate-from-trait-match.rs:28:1
23 | 23 |
24LL | / fn supply<'a, T>(value: T) 24LL | / fn supply<'a, T>(value: T)
diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
index ca794d9..79ed150 100644
--- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
+++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/return-wrong-bound-region.rs:11:16 2 --> $DIR/return-wrong-bound-region.rs:11:16
3 | 3 |
4LL | expect_sig(|a, b| b); // ought to return `a` 4LL | expect_sig(|a, b| b); // ought to return `a`
@@ -18,7 +18,7 @@ LL | expect_sig(|a, b| b); // ought to return `a`
18 | | has type `&'1 i32` 18 | | has type `&'1 i32`
19 | has type `&'2 i32` 19 | has type `&'2 i32`
20 20
21note: No external requirements 21note: no external requirements
22 --> $DIR/return-wrong-bound-region.rs:10:1 22 --> $DIR/return-wrong-bound-region.rs:10:1
23 | 23 |
24LL | / fn test() { 24LL | / fn test() {
diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
index c825227..bff8c66 100644
--- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/projection-no-regions-closure.rs:25:23 2 --> $DIR/projection-no-regions-closure.rs:25:23
3 | 3 |
4LL | with_signature(x, |mut y| Box::new(y.next())) 4LL | with_signature(x, |mut y| Box::new(y.next()))
@@ -11,7 +11,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
11 = note: number of external vids: 3 11 = note: number of external vids: 3
12 = note: where <T as std::iter::Iterator>::Item: '_#2r 12 = note: where <T as std::iter::Iterator>::Item: '_#2r
13 13
14note: No external requirements 14note: no external requirements
15 --> $DIR/projection-no-regions-closure.rs:21:1 15 --> $DIR/projection-no-regions-closure.rs:21:1
16 | 16 |
17LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> 17LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
@@ -33,7 +33,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
33 | 33 |
34 = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`... 34 = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
35 35
36note: External requirements 36note: external requirements
37 --> $DIR/projection-no-regions-closure.rs:34:23 37 --> $DIR/projection-no-regions-closure.rs:34:23
38 | 38 |
39LL | with_signature(x, |mut y| Box::new(y.next())) 39LL | with_signature(x, |mut y| Box::new(y.next()))
@@ -46,7 +46,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
46 = note: number of external vids: 3 46 = note: number of external vids: 3
47 = note: where <T as std::iter::Iterator>::Item: '_#2r 47 = note: where <T as std::iter::Iterator>::Item: '_#2r
48 48
49note: No external requirements 49note: no external requirements
50 --> $DIR/projection-no-regions-closure.rs:30:1 50 --> $DIR/projection-no-regions-closure.rs:30:1
51 | 51 |
52LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> 52LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
@@ -59,7 +59,7 @@ LL | | }
59 | 59 |
60 = note: defining type: correct_region::<'_#1r, T> 60 = note: defining type: correct_region::<'_#1r, T>
61 61
62note: External requirements 62note: external requirements
63 --> $DIR/projection-no-regions-closure.rs:42:23 63 --> $DIR/projection-no-regions-closure.rs:42:23
64 | 64 |
65LL | with_signature(x, |mut y| Box::new(y.next())) 65LL | with_signature(x, |mut y| Box::new(y.next()))
@@ -72,7 +72,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
72 = note: number of external vids: 4 72 = note: number of external vids: 4
73 = note: where <T as std::iter::Iterator>::Item: '_#3r 73 = note: where <T as std::iter::Iterator>::Item: '_#3r
74 74
75note: No external requirements 75note: no external requirements
76 --> $DIR/projection-no-regions-closure.rs:38:1 76 --> $DIR/projection-no-regions-closure.rs:38:1
77 | 77 |
78LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> 78LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
@@ -94,7 +94,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
94 | 94 |
95 = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`... 95 = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
96 96
97note: External requirements 97note: external requirements
98 --> $DIR/projection-no-regions-closure.rs:52:23 98 --> $DIR/projection-no-regions-closure.rs:52:23
99 | 99 |
100LL | with_signature(x, |mut y| Box::new(y.next())) 100LL | with_signature(x, |mut y| Box::new(y.next()))
@@ -107,7 +107,7 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
107 = note: number of external vids: 4 107 = note: number of external vids: 4
108 = note: where <T as std::iter::Iterator>::Item: '_#3r 108 = note: where <T as std::iter::Iterator>::Item: '_#3r
109 109
110note: No external requirements 110note: no external requirements
111 --> $DIR/projection-no-regions-closure.rs:47:1 111 --> $DIR/projection-no-regions-closure.rs:47:1
112 | 112 |
113LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> 113LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
index 7226c52..6d1fbcb 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/projection-one-region-closure.rs:45:29 2 --> $DIR/projection-one-region-closure.rs:45:29
3 | 3 |
4LL | with_signature(cell, t, |cell, t| require(cell, t)); 4LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -13,7 +13,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
13 = note: where T: '_#2r 13 = note: where T: '_#2r
14 = note: where '_#1r: '_#2r 14 = note: where '_#1r: '_#2r
15 15
16note: No external requirements 16note: no external requirements
17 --> $DIR/projection-one-region-closure.rs:41:1 17 --> $DIR/projection-one-region-closure.rs:41:1
18 | 18 |
19LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 19LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -48,7 +48,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
48 | 48 |
49 = help: consider adding the following bound: `'b: 'a` 49 = help: consider adding the following bound: `'b: 'a`
50 50
51note: External requirements 51note: external requirements
52 --> $DIR/projection-one-region-closure.rs:56:29 52 --> $DIR/projection-one-region-closure.rs:56:29
53 | 53 |
54LL | with_signature(cell, t, |cell, t| require(cell, t)); 54LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -62,7 +62,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
62 = note: where T: '_#3r 62 = note: where T: '_#3r
63 = note: where '_#2r: '_#3r 63 = note: where '_#2r: '_#3r
64 64
65note: No external requirements 65note: no external requirements
66 --> $DIR/projection-one-region-closure.rs:51:1 66 --> $DIR/projection-one-region-closure.rs:51:1
67 | 67 |
68LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 68LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -97,7 +97,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
97 | 97 |
98 = help: consider adding the following bound: `'b: 'a` 98 = help: consider adding the following bound: `'b: 'a`
99 99
100note: External requirements 100note: external requirements
101 --> $DIR/projection-one-region-closure.rs:70:29 101 --> $DIR/projection-one-region-closure.rs:70:29
102 | 102 |
103LL | with_signature(cell, t, |cell, t| require(cell, t)); 103LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -110,7 +110,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
110 = note: number of external vids: 4 110 = note: number of external vids: 4
111 = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r 111 = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r
112 112
113note: No external requirements 113note: no external requirements
114 --> $DIR/projection-one-region-closure.rs:62:1 114 --> $DIR/projection-one-region-closure.rs:62:1
115 | 115 |
116LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 116LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -124,7 +124,7 @@ LL | | }
124 | 124 |
125 = note: defining type: projection_outlives::<'_#1r, '_#2r, T> 125 = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
126 126
127note: External requirements 127note: external requirements
128 --> $DIR/projection-one-region-closure.rs:80:29 128 --> $DIR/projection-one-region-closure.rs:80:29
129 | 129 |
130LL | with_signature(cell, t, |cell, t| require(cell, t)); 130LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -138,7 +138,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
138 = note: where T: '_#3r 138 = note: where T: '_#3r
139 = note: where '_#2r: '_#3r 139 = note: where '_#2r: '_#3r
140 140
141note: No external requirements 141note: no external requirements
142 --> $DIR/projection-one-region-closure.rs:74:1 142 --> $DIR/projection-one-region-closure.rs:74:1
143 | 143 |
144LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 144LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
index 655995c..59d8aa4 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr
@@ -1,4 +1,4 @@
1note: External requirements 1note: external requirements
2 --> $DIR/projection-one-region-trait-bound-closure.rs:37:29 2 --> $DIR/projection-one-region-trait-bound-closure.rs:37:29
3 | 3 |
4LL | with_signature(cell, t, |cell, t| require(cell, t)); 4LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -12,7 +12,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
12 = note: number of external vids: 4 12 = note: number of external vids: 4
13 = note: where '_#1r: '_#2r 13 = note: where '_#1r: '_#2r
14 14
15note: No external requirements 15note: no external requirements
16 --> $DIR/projection-one-region-trait-bound-closure.rs:33:1 16 --> $DIR/projection-one-region-trait-bound-closure.rs:33:1
17 | 17 |
18LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 18LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -39,7 +39,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
39 | 39 |
40 = help: consider adding the following bound: `'b: 'a` 40 = help: consider adding the following bound: `'b: 'a`
41 41
42note: External requirements 42note: external requirements
43 --> $DIR/projection-one-region-trait-bound-closure.rs:47:29 43 --> $DIR/projection-one-region-trait-bound-closure.rs:47:29
44 | 44 |
45LL | with_signature(cell, t, |cell, t| require(cell, t)); 45LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -52,7 +52,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
52 = note: number of external vids: 4 52 = note: number of external vids: 4
53 = note: where '_#2r: '_#3r 53 = note: where '_#2r: '_#3r
54 54
55note: No external requirements 55note: no external requirements
56 --> $DIR/projection-one-region-trait-bound-closure.rs:42:1 56 --> $DIR/projection-one-region-trait-bound-closure.rs:42:1
57 | 57 |
58LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 58LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -79,7 +79,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
79 | 79 |
80 = help: consider adding the following bound: `'b: 'a` 80 = help: consider adding the following bound: `'b: 'a`
81 81
82note: External requirements 82note: external requirements
83 --> $DIR/projection-one-region-trait-bound-closure.rs:60:29 83 --> $DIR/projection-one-region-trait-bound-closure.rs:60:29
84 | 84 |
85LL | with_signature(cell, t, |cell, t| require(cell, t)); 85LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -92,7 +92,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
92 = note: number of external vids: 4 92 = note: number of external vids: 4
93 = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r 93 = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r
94 94
95note: No external requirements 95note: no external requirements
96 --> $DIR/projection-one-region-trait-bound-closure.rs:52:1 96 --> $DIR/projection-one-region-trait-bound-closure.rs:52:1
97 | 97 |
98LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 98LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -106,7 +106,7 @@ LL | | }
106 | 106 |
107 = note: defining type: projection_outlives::<'_#1r, '_#2r, T> 107 = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
108 108
109note: External requirements 109note: external requirements
110 --> $DIR/projection-one-region-trait-bound-closure.rs:69:29 110 --> $DIR/projection-one-region-trait-bound-closure.rs:69:29
111 | 111 |
112LL | with_signature(cell, t, |cell, t| require(cell, t)); 112LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -119,7 +119,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
119 = note: number of external vids: 4 119 = note: number of external vids: 4
120 = note: where '_#2r: '_#3r 120 = note: where '_#2r: '_#3r
121 121
122note: No external requirements 122note: no external requirements
123 --> $DIR/projection-one-region-trait-bound-closure.rs:64:1 123 --> $DIR/projection-one-region-trait-bound-closure.rs:64:1
124 | 124 |
125LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 125LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -133,7 +133,7 @@ LL | | }
133 | 133 |
134 = note: defining type: elements_outlive::<'_#1r, '_#2r, T> 134 = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
135 135
136note: External requirements 136note: external requirements
137 --> $DIR/projection-one-region-trait-bound-closure.rs:81:29 137 --> $DIR/projection-one-region-trait-bound-closure.rs:81:29
138 | 138 |
139LL | with_signature(cell, t, |cell, t| require(cell, t)); 139LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -146,7 +146,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
146 = note: number of external vids: 3 146 = note: number of external vids: 3
147 = note: where '_#1r: '_#2r 147 = note: where '_#1r: '_#2r
148 148
149note: No external requirements 149note: no external requirements
150 --> $DIR/projection-one-region-trait-bound-closure.rs:73:1 150 --> $DIR/projection-one-region-trait-bound-closure.rs:73:1
151 | 151 |
152LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) 152LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
index 2fb07b9..c3b9245 100644
--- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr
@@ -1,4 +1,4 @@
1note: No external requirements 1note: no external requirements
2 --> $DIR/projection-one-region-trait-bound-static-closure.rs:36:29 2 --> $DIR/projection-one-region-trait-bound-static-closure.rs:36:29
3 | 3 |
4LL | with_signature(cell, t, |cell, t| require(cell, t)); 4LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -10,7 +10,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
10 ] 10 ]
11 = note: late-bound region is '_#3r 11 = note: late-bound region is '_#3r
12 12
13note: No external requirements 13note: no external requirements
14 --> $DIR/projection-one-region-trait-bound-static-closure.rs:32:1 14 --> $DIR/projection-one-region-trait-bound-static-closure.rs:32:1
15 | 15 |
16LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 16LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -23,7 +23,7 @@ LL | | }
23 | 23 |
24 = note: defining type: no_relationships_late::<'_#1r, T> 24 = note: defining type: no_relationships_late::<'_#1r, T>
25 25
26note: No external requirements 26note: no external requirements
27 --> $DIR/projection-one-region-trait-bound-static-closure.rs:45:29 27 --> $DIR/projection-one-region-trait-bound-static-closure.rs:45:29
28 | 28 |
29LL | with_signature(cell, t, |cell, t| require(cell, t)); 29LL | with_signature(cell, t, |cell, t| require(cell, t));
@@ -34,7 +34,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t));
34 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), 34 extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
35 ] 35 ]
36 36
37note: No external requirements 37note: no external requirements
38 --> $DIR/projection-one-region-trait-bound-static-closure.rs:40:1 38 --> $DIR/projection-one-region-trait-bound-static-closure.rs:40:1
39 | 39 |
40LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) 40LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
@@ -48,7 +48,7 @@ LL | | }
48 | 48 |
49 = note: defining type: no_relationships_early::<'_#1r, '_#2r, T> 49 = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>