From 199ee327739b12c67adef326d68164bfbf5e29c9 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Thu, 12 Apr 2018 16:53:28 -0500 Subject: [PATCH 1/9] stop requiring the feature-gate to use dyn_trait --- src/libsyntax/feature_gate.rs | 9 ++------- src/test/ui/feature-gate-dyn-trait.stderr | 11 ----------- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 src/test/ui/feature-gate-dyn-trait.stderr diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 120dff2dbb926..c4a0ec259b433 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -375,9 +375,6 @@ declare_features! ( // Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008) (active, non_exhaustive, "1.22.0", Some(44109), None), - // Trait object syntax with `dyn` prefix - (active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)), - // `crate` as visibility modifier, synonymous to `pub(crate)` (active, crate_visibility_modifier, "1.23.0", Some(45388), Some(Edition::Edition2018)), @@ -592,6 +589,8 @@ declare_features! ( (accepted, cfg_target_feature, "1.27.0", Some(29717), None), // Allows #[target_feature(...)] (accepted, target_feature, "1.27.0", None, None), + // Trait object syntax with `dyn` prefix + (accepted, dyn_trait, "1.22.0", Some(44662), None), ); // If you change this, please modify src/doc/unstable-book as well. You must @@ -1657,10 +1656,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, never_type, ty.span, "The `!` type is experimental"); } - ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::Dyn) => { - gate_feature_post!(&self, dyn_trait, ty.span, - "`dyn Trait` syntax is unstable"); - } _ => {} } visit::walk_ty(self, ty) diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr deleted file mode 100644 index 6e6bdf1cbf0de..0000000000000 --- a/src/test/ui/feature-gate-dyn-trait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0658]: `dyn Trait` syntax is unstable (see issue #44662) - --> $DIR/feature-gate-dyn-trait.rs:12:14 - | -LL | type A = Box; //~ ERROR `dyn Trait` syntax is unstable - | ^^^^^^^^^ - | - = help: add #![feature(dyn_trait)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. From c86f1c8cc396df443e0933278c441e36302047b1 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Thu, 12 Apr 2018 16:54:17 -0500 Subject: [PATCH 2/9] removed dyn_trait feature from tests --- src/test/compile-fail/impl-trait/where-allowed.rs | 4 +++- src/test/compile-fail/mir_check_cast_unsize.rs | 1 - src/test/compile-fail/trait-bounds-not-on-struct.rs | 1 - src/test/run-pass/dyn-trait.rs | 2 -- src/test/ui/impl_trait_projections.rs | 2 ++ src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs | 1 - src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs | 1 - src/test/ui/nll/ty-outlives/projection-one-region-closure.rs | 1 - .../ty-outlives/projection-one-region-trait-bound-closure.rs | 1 - .../projection-one-region-trait-bound-static-closure.rs | 1 - .../ty-outlives/projection-two-region-trait-bound-closure.rs | 1 - .../ty-outlives/ty-param-closure-approximate-lower-bound.rs | 1 - .../ty-outlives/ty-param-closure-outlives-from-return-type.rs | 1 - .../ty-param-closure-outlives-from-where-clause.rs | 1 - src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs | 1 - src/test/ui/nll/ty-outlives/ty-param-fn-body.rs | 1 - src/test/ui/nll/ty-outlives/ty-param-fn.rs | 1 - 17 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/test/compile-fail/impl-trait/where-allowed.rs b/src/test/compile-fail/impl-trait/where-allowed.rs index 038eacaf1103e..f7b331238c6dd 100644 --- a/src/test/compile-fail/impl-trait/where-allowed.rs +++ b/src/test/compile-fail/impl-trait/where-allowed.rs @@ -10,7 +10,9 @@ //! A simple test for testing many permutations of allowedness of //! impl Trait -#![feature(dyn_trait)] + +#![feature(conservative_impl_trait, universal_impl_trait)] + use std::fmt::Debug; // Allowed diff --git a/src/test/compile-fail/mir_check_cast_unsize.rs b/src/test/compile-fail/mir_check_cast_unsize.rs index e30bed6105815..a2c840a70980b 100644 --- a/src/test/compile-fail/mir_check_cast_unsize.rs +++ b/src/test/compile-fail/mir_check_cast_unsize.rs @@ -11,7 +11,6 @@ // compile-flags: -Z borrowck=mir #![allow(dead_code)] -#![feature(dyn_trait)] use std::fmt::Debug; diff --git a/src/test/compile-fail/trait-bounds-not-on-struct.rs b/src/test/compile-fail/trait-bounds-not-on-struct.rs index 0dd1a4e7d7335..1b1a238a941e5 100644 --- a/src/test/compile-fail/trait-bounds-not-on-struct.rs +++ b/src/test/compile-fail/trait-bounds-not-on-struct.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(dyn_trait)] #![allow(bare_trait_object)] struct Foo; diff --git a/src/test/run-pass/dyn-trait.rs b/src/test/run-pass/dyn-trait.rs index 399823ec92d0c..010667942424c 100644 --- a/src/test/run-pass/dyn-trait.rs +++ b/src/test/run-pass/dyn-trait.rs @@ -10,8 +10,6 @@ // ignore-pretty `dyn ::foo` parses differently in the current edition -#![feature(dyn_trait)] - use std::fmt::Display; static BYTE: u8 = 33; diff --git a/src/test/ui/impl_trait_projections.rs b/src/test/ui/impl_trait_projections.rs index 6a72794227109..e8e25c1984003 100644 --- a/src/test/ui/impl_trait_projections.rs +++ b/src/test/ui/impl_trait_projections.rs @@ -7,7 +7,9 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. + #![feature(dyn_trait)] +#![feature(conservative_impl_trait, universal_impl_trait)] use std::fmt::Debug; use std::option; diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs index 7b3ed6a94fcbb..4767b75d89c1a 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -15,7 +15,6 @@ // Iterator>::Item`, to be exact). #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] trait Anything { } diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs index 32b73a51e11a5..dea2daf7e8eeb 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs @@ -11,7 +11,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] trait Anything { } diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs index cfe2880bfed47..77024c4119ff9 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs @@ -25,7 +25,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs index 16e91f2708fe9..fb1009c9cc8e8 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs @@ -17,7 +17,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs index 0d42636c844a5..1f2f40196f8ee 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs @@ -16,7 +16,6 @@ // compile-pass #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs index 7c8ef140a2907..5307d0880d4da 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs @@ -18,7 +18,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs index 80b42c29563f1..7ff4b484af17b 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs @@ -11,7 +11,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs index 50763a1d50808..b5cbd07b99c18 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs @@ -11,7 +11,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::fmt::Debug; diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs index b70fc2b2ec4b4..edaaeac080d4d 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs @@ -15,7 +15,6 @@ // compile-flags:-Zborrowck=mir -Zverbose #![allow(warnings)] -#![feature(dyn_trait)] #![feature(rustc_attrs)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs index babe608354fb9..c0c483b3957d4 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.rs @@ -15,7 +15,6 @@ #![feature(nll)] #![allow(warnings)] -#![feature(dyn_trait)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs b/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs index fb4ea63f8532c..6226108ef196f 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.rs @@ -14,7 +14,6 @@ // function body. #![allow(warnings)] -#![feature(dyn_trait)] use std::cell::Cell; diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.rs b/src/test/ui/nll/ty-outlives/ty-param-fn.rs index 42d662e14193c..258d77eb2b078 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.rs @@ -11,7 +11,6 @@ // compile-flags:-Zborrowck=mir #![allow(warnings)] -#![feature(dyn_trait)] use std::fmt::Debug; From 0efb5677d74451787a4dbd77fce1701c52c72a68 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Thu, 12 Apr 2018 16:55:09 -0500 Subject: [PATCH 3/9] dyn_trait feature-gate just for stage0 --- src/librustc/lib.rs | 2 +- src/librustc_mir/lib.rs | 2 +- src/librustc_typeck/lib.rs | 4 +++- .../termination-trait-for-box-dyn-error.rs | 2 -- .../termination-trait-for-box-dyn-error.rs | 2 -- src/test/ui/impl_trait_projections.rs | 1 - src/test/ui/in-band-lifetimes/impl/dyn-trait.rs | 1 - src/test/ui/raw-literal-keywords.rs | 1 - .../ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs | 2 -- src/test/ui/underscore-lifetime/dyn-trait-underscore.rs | 2 -- 10 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index bb495049483ac..f29da5eb11280 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -45,8 +45,8 @@ #![feature(const_fn)] #![feature(core_intrinsics)] #![feature(drain_filter)] -#![feature(dyn_trait)] #![feature(entry_or_default)] +#![cfg_attr(stage0, feature(dyn_trait))] #![feature(from_ref)] #![feature(fs_read_write)] #![cfg_attr(windows, feature(libc))] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index a47b3cacc517e..482fd5989f8bd 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -24,7 +24,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![feature(const_fn)] #![feature(core_intrinsics)] #![feature(decl_macro)] -#![feature(dyn_trait)] +#![cfg_attr(stage0, feature(dyn_trait))] #![feature(fs_read_write)] #![feature(macro_vis_matcher)] #![feature(exhaustive_patterns)] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index ed0cfe38a7ad9..e852edc6eed00 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -71,6 +71,8 @@ This API is completely unstable and subject to change. #![allow(non_camel_case_types)] +#![cfg_attr(stage0, feature(dyn_trait))] + #![feature(box_patterns)] #![feature(box_syntax)] #![feature(crate_visibility_modifier)] @@ -81,8 +83,8 @@ This API is completely unstable and subject to change. #![feature(rustc_diagnostic_macros)] #![feature(slice_patterns)] #![feature(slice_sort_by_cached_key)] -#![feature(dyn_trait)] #![feature(never_type)] +#![feature(underscore_lifetimes)] #[macro_use] extern crate log; #[macro_use] extern crate syntax; diff --git a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs b/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs index 219eca6fd21e5..66a6e6afed34b 100644 --- a/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs +++ b/src/test/run-fail/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs @@ -11,8 +11,6 @@ // compile-pass // failure-status: 1 -#![feature(dyn_trait)] - use std::error::Error; use std::io; diff --git a/src/test/run-pass/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs index 24c30a5abc22a..183bb55353052 100644 --- a/src/test/run-pass/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs +++ b/src/test/run-pass/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(dyn_trait)] - use std::error::Error; fn main() -> Result<(), Box> { diff --git a/src/test/ui/impl_trait_projections.rs b/src/test/ui/impl_trait_projections.rs index e8e25c1984003..e8f39e169ff9a 100644 --- a/src/test/ui/impl_trait_projections.rs +++ b/src/test/ui/impl_trait_projections.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(dyn_trait)] #![feature(conservative_impl_trait, universal_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/in-band-lifetimes/impl/dyn-trait.rs b/src/test/ui/in-band-lifetimes/impl/dyn-trait.rs index a504bae2e6007..c27bbe77fbf19 100644 --- a/src/test/ui/in-band-lifetimes/impl/dyn-trait.rs +++ b/src/test/ui/in-band-lifetimes/impl/dyn-trait.rs @@ -13,7 +13,6 @@ #![allow(warnings)] -#![feature(dyn_trait)] #![feature(in_band_lifetimes)] use std::fmt::Debug; diff --git a/src/test/ui/raw-literal-keywords.rs b/src/test/ui/raw-literal-keywords.rs index 9b28aa0b15116..9bb6653d77080 100644 --- a/src/test/ui/raw-literal-keywords.rs +++ b/src/test/ui/raw-literal-keywords.rs @@ -10,7 +10,6 @@ // compile-flags: -Z parse-only -#![feature(dyn_trait)] #![feature(raw_identifiers)] fn test_if() { diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs index e573ad8fc1f09..6c83205d0504c 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.rs @@ -13,8 +13,6 @@ // // cc #48468 -#![feature(dyn_trait)] - use std::fmt::Debug; struct Foo { diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs b/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs index 9640d3465978f..247492fb7b77b 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.rs @@ -13,8 +13,6 @@ // // cc #48468 -#![feature(dyn_trait)] - fn a(items: &[T]) -> Box> { // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime From 55a653dd359a6e5c8da7e47399310a79fd094932 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Fri, 13 Apr 2018 17:07:33 -0500 Subject: [PATCH 4/9] removed linting for dyn_trait --- src/librustc/hir/lowering.rs | 16 +++++++--------- src/librustc_typeck/lib.rs | 1 - 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 4023521147e78..74fedd6bfbafe 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -4107,15 +4107,13 @@ impl<'a> LoweringContext<'a> { } fn maybe_lint_bare_trait(&self, span: Span, id: NodeId, is_global: bool) { - if self.sess.features_untracked().dyn_trait { - self.sess.buffer_lint_with_diagnostic( - builtin::BARE_TRAIT_OBJECT, - id, - span, - "trait objects without an explicit `dyn` are deprecated", - builtin::BuiltinLintDiagnostics::BareTraitObject(span, is_global), - ) - } + self.sess.buffer_lint_with_diagnostic( + builtin::BARE_TRAIT_OBJECT, + id, + span, + "trait objects without an explicit `dyn` are deprecated", + builtin::BuiltinLintDiagnostics::BareTraitObject(span, is_global), + ) } fn wrap_in_try_constructor( diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index e852edc6eed00..1e48926f2b3be 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -84,7 +84,6 @@ This API is completely unstable and subject to change. #![feature(slice_patterns)] #![feature(slice_sort_by_cached_key)] #![feature(never_type)] -#![feature(underscore_lifetimes)] #[macro_use] extern crate log; #[macro_use] extern crate syntax; From 4bf35f93c9e753b413a9ff5b2a79ae5b1efbd4b8 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Fri, 13 Apr 2018 19:21:23 -0500 Subject: [PATCH 5/9] updated stderr files and removed feature-gate test for dyn_trait --- src/test/ui/feature-gate-dyn-trait.rs | 14 ------ src/test/ui/impl_trait_projections.stderr | 10 ++-- .../in-band-lifetimes/impl/dyn-trait.stderr | 6 +-- .../projection-no-regions-closure.stderr | 24 +++++----- .../projection-no-regions-fn.stderr | 8 ++-- .../projection-one-region-closure.stderr | 34 ++++++------- ...tion-one-region-trait-bound-closure.stderr | 32 ++++++------- ...e-region-trait-bound-static-closure.stderr | 20 ++++---- ...tion-two-region-trait-bound-closure.stderr | 48 +++++++++---------- ...ram-closure-approximate-lower-bound.stderr | 16 +++---- ...m-closure-outlives-from-return-type.stderr | 12 ++--- ...-closure-outlives-from-where-clause.stderr | 24 +++++----- .../ty-param-fn-body-nll-feature.stderr | 2 +- .../nll/ty-outlives/ty-param-fn-body.stderr | 4 +- .../ui/nll/ty-outlives/ty-param-fn.stderr | 8 ++-- src/test/ui/raw-literal-keywords.stderr | 6 +-- .../dyn-trait-underscore-in-struct.stderr | 4 +- .../dyn-trait-underscore.stderr | 8 ++-- 18 files changed, 133 insertions(+), 147 deletions(-) delete mode 100644 src/test/ui/feature-gate-dyn-trait.rs diff --git a/src/test/ui/feature-gate-dyn-trait.rs b/src/test/ui/feature-gate-dyn-trait.rs deleted file mode 100644 index 4b3803d019baa..0000000000000 --- a/src/test/ui/feature-gate-dyn-trait.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -trait Trait {} -type A = Box; //~ ERROR `dyn Trait` syntax is unstable - -fn main() {} diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index 9b38de614fc10..f0fe1a9754a95 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -1,29 +1,29 @@ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:23:51 + --> $DIR/impl_trait_projections.rs:24:51 | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:30:9 + --> $DIR/impl_trait_projections.rs:31:9 | LL | -> ::Item | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:37:27 + --> $DIR/impl_trait_projections.rs:38:27 | LL | -> <::std::ops::Range as Iterator>::Item | ^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:44:29 + --> $DIR/impl_trait_projections.rs:45:29 | LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type - --> $DIR/impl_trait_projections.rs:23:50 + --> $DIR/impl_trait_projections.rs:24:50 | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr b/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr index 9d6a318c07513..201470abe674c 100644 --- a/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr +++ b/src/test/ui/in-band-lifetimes/impl/dyn-trait.stderr @@ -1,11 +1,11 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements - --> $DIR/dyn-trait.rs:33:16 + --> $DIR/dyn-trait.rs:32:16 | LL | static_val(x); //~ ERROR cannot infer | ^ | -note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 32:1... - --> $DIR/dyn-trait.rs:32:1 +note: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 31:1... + --> $DIR/dyn-trait.rs:31:1 | LL | fn with_dyn_debug_static<'a>(x: Box) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 0efbbdff12a3f..3689ca74adb8c 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,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:36:31 + --> $DIR/projection-no-regions-closure.rs:35:31 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-closure.rs:54:31 + --> $DIR/projection-no-regions-closure.rs:53:31 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^ note: External requirements - --> $DIR/projection-no-regions-closure.rs:36:23 + --> $DIR/projection-no-regions-closure.rs:35:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#2r error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-closure.rs:36:23 + --> $DIR/projection-no-regions-closure.rs:35:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -34,7 +34,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... note: No external requirements - --> $DIR/projection-no-regions-closure.rs:32:1 + --> $DIR/projection-no-regions-closure.rs:31:1 | LL | / fn no_region<'a, T>(x: Box) -> Box LL | | where @@ -51,7 +51,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:46:23 + --> $DIR/projection-no-regions-closure.rs:45:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -66,7 +66,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#2r note: No external requirements - --> $DIR/projection-no-regions-closure.rs:42:1 + --> $DIR/projection-no-regions-closure.rs:41:1 | LL | / fn correct_region<'a, T>(x: Box) -> Box LL | | where @@ -82,7 +82,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:54:23 + --> $DIR/projection-no-regions-closure.rs:53:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,7 +98,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#3r error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-closure.rs:54:23 + --> $DIR/projection-no-regions-closure.rs:53:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -106,7 +106,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... note: No external requirements - --> $DIR/projection-no-regions-closure.rs:50:1 + --> $DIR/projection-no-regions-closure.rs:49:1 | LL | / fn wrong_region<'a, 'b, T>(x: Box) -> Box LL | | where @@ -124,7 +124,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-no-regions-closure.rs:65:23 + --> $DIR/projection-no-regions-closure.rs:64:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -140,7 +140,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) = note: where ::Item: '_#3r note: No external requirements - --> $DIR/projection-no-regions-closure.rs:60:1 + --> $DIR/projection-no-regions-closure.rs:59:1 | LL | / fn outlives_region<'a, 'b, T>(x: Box) -> Box LL | | where diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr index b2c5f28268db8..3199ec151335d 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:24:5 + --> $DIR/projection-no-regions-fn.rs:23:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-no-regions-fn.rs:40:5 + --> $DIR/projection-no-regions-fn.rs:39:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-fn.rs:24:5 + --> $DIR/projection-no-regions-fn.rs:23:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ LL | Box::new(x.next()) = help: consider adding an explicit lifetime bound `::Item: ReEarlyBound(0, 'a)`... error[E0309]: the associated type `::Item` may not live long enough - --> $DIR/projection-no-regions-fn.rs:40:5 + --> $DIR/projection-no-regions-fn.rs:39:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ 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 0d5a2dc7c5598..e1218830dbb64 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,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:56:39 + --> $DIR/projection-one-region-closure.rs:55:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:68:39 + --> $DIR/projection-one-region-closure.rs:67:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-closure.rs:90:39 + --> $DIR/projection-one-region-closure.rs:89:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-one-region-closure.rs:56:29 + --> $DIR/projection-one-region-closure.rs:55:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:56:29 + --> $DIR/projection-one-region-closure.rs:55:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -41,13 +41,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`... error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` - --> $DIR/projection-one-region-closure.rs:56:20 + --> $DIR/projection-one-region-closure.rs:55:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-closure.rs:52:1 + --> $DIR/projection-one-region-closure.rs:51:1 | LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -64,7 +64,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:68:29 + --> $DIR/projection-one-region-closure.rs:67:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:68:29 + --> $DIR/projection-one-region-closure.rs:67:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -89,13 +89,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:68:20 + --> $DIR/projection-one-region-closure.rs:67:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-closure.rs:63:1 + --> $DIR/projection-one-region-closure.rs:62:1 | LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -113,7 +113,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:90:29 + --> $DIR/projection-one-region-closure.rs:89:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -130,7 +130,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/projection-one-region-closure.rs:90:29 + --> $DIR/projection-one-region-closure.rs:89:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -138,13 +138,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:90:20 + --> $DIR/projection-one-region-closure.rs:89:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-closure.rs:75:1 + --> $DIR/projection-one-region-closure.rs:74:1 | LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -162,7 +162,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:103:29 + --> $DIR/projection-one-region-closure.rs:102:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -179,7 +179,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-closure.rs:97:1 + --> $DIR/projection-one-region-closure.rs:96:1 | LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where 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 d4aca8380b469..76554e29f62ea 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,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:48:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:59:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-one-region-trait-bound-closure.rs:80:39 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:48:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,13 +32,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` - --> $DIR/projection-one-region-trait-bound-closure.rs:48:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:47:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:44:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:43:1 | LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -55,7 +55,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:59:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -71,13 +71,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:59:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:58:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:54:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:53:1 | LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -95,7 +95,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:80:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,13 +111,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:80:20 + --> $DIR/projection-one-region-trait-bound-closure.rs:79:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:65:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:64:1 | LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -135,7 +135,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:91:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:90:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -151,7 +151,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#2r: '_#3r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:86:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:85:1 | LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -169,7 +169,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 + --> $DIR/projection-one-region-trait-bound-closure.rs:102:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -184,7 +184,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where '_#1r: '_#2r note: No external requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 + --> $DIR/projection-one-region-trait-bound-closure.rs:94:1 | LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | | where 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 875907e6b39d5..136e143e80edf 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,5 +1,5 @@ note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:47:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:46:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:43:1 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:42:1 | LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -28,7 +28,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:56:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:55:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -42,7 +42,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:51:1 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:50:1 | LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -60,7 +60,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:75:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:74:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -74,7 +74,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:60:1 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:59:1 | LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -92,7 +92,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:84:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:83:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -106,7 +106,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:79:1 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:78:1 | LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -124,7 +124,7 @@ LL | | } ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:96:29 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:95:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -137,7 +137,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); ] note: No external requirements - --> $DIR/projection-one-region-trait-bound-static-closure.rs:88:1 + --> $DIR/projection-one-region-trait-bound-static-closure.rs:87:1 | LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index 7e36e467e4eba..c7f456929609e 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -1,29 +1,29 @@ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:49:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:60:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:81:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/projection-two-region-trait-bound-closure.rs:109:39 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:39 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^ note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -39,7 +39,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#3r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:49:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:48:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,7 +47,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`... note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:45:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:44:1 | LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -65,7 +65,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -82,7 +82,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:59:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -90,7 +90,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:55:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:54:1 | LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -109,7 +109,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -126,7 +126,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r error[E0309]: the associated type `>::AssocType` may not live long enough - --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:80:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = help: consider adding an explicit lifetime bound `>::AssocType: ReEarlyBound(0, 'a)`... note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:66:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:65:1 | LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -153,7 +153,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:92:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:91:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -170,7 +170,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:87:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:86:1 | LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -189,7 +189,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:100:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -206,7 +206,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#4r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:95:1 | LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -225,7 +225,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -240,13 +240,13 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#2r error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` - --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 + --> $DIR/projection-two-region-trait-bound-closure.rs:108:20 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^ note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:105:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:104:1 | LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -263,7 +263,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:119:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,7 +279,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#3r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:114:1 | LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | | where @@ -297,7 +297,7 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 + --> $DIR/projection-two-region-trait-bound-closure.rs:131:29 | LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -312,7 +312,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: where >::AssocType: '_#2r note: No external requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 + --> $DIR/projection-two-region-trait-bound-closure.rs:123:1 | LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index c8feaddff9382..b4f51401a90f6 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -1,23 +1,23 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:31 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:31 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:31 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^ note: External requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:35:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: where T: '_#1r note: No external requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:33:1 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:32:1 | LL | / fn generic(value: T) { LL | | let cell = Cell::new(&()); @@ -47,7 +47,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -61,7 +61,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: where T: '_#1r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:24 | LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ @@ -69,7 +69,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`... note: No external requirements - --> $DIR/ty-param-closure-approximate-lower-bound.rs:42:1 + --> $DIR/ty-param-closure-approximate-lower-bound.rs:41:1 | LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { LL | | twice(cell, value, |a, b| invoke(a, b)); diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index 500595e0c5dca..59a8a39a7b085 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:27 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27 | LL | with_signature(x, |y| y) | ^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 | LL | x | ^ note: External requirements - --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23 | LL | with_signature(x, |y| y) | ^^^^^ @@ -26,7 +26,7 @@ LL | with_signature(x, |y| y) = note: where T: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-return-type.rs:37:23 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23 | LL | with_signature(x, |y| y) | ^^^^^ @@ -34,7 +34,7 @@ LL | with_signature(x, |y| y) = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... note: No external requirements - --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:1 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:25:1 | LL | / fn no_region<'a, T>(x: Box) -> Box LL | | where @@ -51,7 +51,7 @@ LL | | } ] error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-return-type.rs:53:5 + --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5 | LL | x | ^ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 4d8a66ba8e1c4..a53ce21b7e6d2 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:45:9 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:44:9 | LL | require(&x, &y) | ^^^^^^^ warning: not reporting region error due to nll - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:79:9 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:78:9 | LL | require(&x, &y) | ^^^^^^^ note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -32,7 +32,7 @@ LL | | }) = note: where T: '_#1r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -47,7 +47,7 @@ LL | | }) = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`... note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:36:1 | LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { LL | | with_signature(a, b, |x, y| { @@ -63,7 +63,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:54:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -85,7 +85,7 @@ LL | | }) = note: where T: '_#2r note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:51:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:50:1 | LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) LL | | where @@ -102,7 +102,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -123,7 +123,7 @@ LL | | }) = note: where T: '_#2r error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:75:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -137,7 +137,7 @@ LL | | }) = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`... note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:71:1 | LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) LL | | where @@ -154,7 +154,7 @@ LL | | } ] note: External requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:89:26 | LL | with_signature(a, b, |x, y| { | __________________________^ @@ -174,7 +174,7 @@ LL | | }) = note: where T: '_#3r note: No external requirements - --> $DIR/ty-param-closure-outlives-from-where-clause.rs:85:1 + --> $DIR/ty-param-closure-outlives-from-where-clause.rs:84:1 | LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) LL | | where diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr index 1510ca61e5c75..dec15f47a0301 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body-nll-feature.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn-body-nll-feature.rs:31:5 + --> $DIR/ty-param-fn-body-nll-feature.rs:30:5 | LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr index 0596861e67b57..537f12234708e 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn-body.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-fn-body.rs:30:5 + --> $DIR/ty-param-fn-body.rs:29:5 | LL | outlives(cell, t) | ^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn-body.rs:30:5 + --> $DIR/ty-param-fn-body.rs:29:5 | LL | outlives(cell, t) | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr index 0d09cac8c3851..5ce50d8118578 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-fn.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-fn.stderr @@ -1,17 +1,17 @@ warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:22:5 + --> $DIR/ty-param-fn.rs:21:5 | LL | x | ^ warning: not reporting region error due to nll - --> $DIR/ty-param-fn.rs:38:5 + --> $DIR/ty-param-fn.rs:37:5 | LL | x | ^ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn.rs:22:5 + --> $DIR/ty-param-fn.rs:21:5 | LL | x | ^ @@ -19,7 +19,7 @@ LL | x = help: consider adding an explicit lifetime bound `T: 'a`... error[E0309]: the parameter type `T` may not live long enough - --> $DIR/ty-param-fn.rs:38:5 + --> $DIR/ty-param-fn.rs:37:5 | LL | x | ^ diff --git a/src/test/ui/raw-literal-keywords.stderr b/src/test/ui/raw-literal-keywords.stderr index 3758568323cc0..022f80ae8a4ec 100644 --- a/src/test/ui/raw-literal-keywords.stderr +++ b/src/test/ui/raw-literal-keywords.stderr @@ -1,17 +1,17 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `true` - --> $DIR/raw-literal-keywords.rs:17:10 + --> $DIR/raw-literal-keywords.rs:16:10 | LL | r#if true { } //~ ERROR found `true` | ^^^^ expected one of 8 possible tokens here error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test` - --> $DIR/raw-literal-keywords.rs:21:14 + --> $DIR/raw-literal-keywords.rs:20:14 | LL | r#struct Test; //~ ERROR found `Test` | ^^^^ expected one of 8 possible tokens here error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `Test` - --> $DIR/raw-literal-keywords.rs:25:13 + --> $DIR/raw-literal-keywords.rs:24:13 | LL | r#union Test; //~ ERROR found `Test` | ^^^^ expected one of 8 possible tokens here diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr index 6d777841f0319..1017217828a7b 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr @@ -1,11 +1,11 @@ error[E0106]: missing lifetime specifier - --> $DIR/dyn-trait-underscore-in-struct.rs:21:24 + --> $DIR/dyn-trait-underscore-in-struct.rs:19:24 | LL | x: Box, //~ ERROR missing lifetime specifier | ^^ expected lifetime parameter error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound - --> $DIR/dyn-trait-underscore-in-struct.rs:21:12 + --> $DIR/dyn-trait-underscore-in-struct.rs:19:12 | LL | x: Box, //~ ERROR missing lifetime specifier | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index f1e59aed54a36..98249d3f2b567 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -1,11 +1,11 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements - --> $DIR/dyn-trait-underscore.rs:20:20 + --> $DIR/dyn-trait-underscore.rs:18:20 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^ | -note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the function body at 18:1... - --> $DIR/dyn-trait-underscore.rs:18:1 +note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the function body at 16:1... + --> $DIR/dyn-trait-underscore.rs:16:1 | LL | / fn a(items: &[T]) -> Box> { LL | | // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` @@ -13,7 +13,7 @@ LL | | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime LL | | } | |_^ note: ...so that reference does not outlive borrowed content - --> $DIR/dyn-trait-underscore.rs:20:14 + --> $DIR/dyn-trait-underscore.rs:18:14 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^ From 72a8eb92b083b22c610512c9c89c6bc97660de34 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Sun, 15 Apr 2018 09:41:10 -0500 Subject: [PATCH 6/9] fixed rustc version for dyn_trait --- src/libsyntax/feature_gate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index c4a0ec259b433..6ab8a54cf96ad 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -590,7 +590,7 @@ declare_features! ( // Allows #[target_feature(...)] (accepted, target_feature, "1.27.0", None, None), // Trait object syntax with `dyn` prefix - (accepted, dyn_trait, "1.22.0", Some(44662), None), + (accepted, dyn_trait, "1.27.0", Some(44662), None), ); // If you change this, please modify src/doc/unstable-book as well. You must From cadf251b7874cbd94198ebef95e6260c118a2fef Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Wed, 18 Apr 2018 13:33:36 -0500 Subject: [PATCH 7/9] removed dyn trait attribute from librustdoc --- src/librustdoc/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 60b713f2995e1..1819c7eb7d15f 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -23,7 +23,6 @@ #![feature(test)] #![feature(vec_remove_item)] #![feature(entry_and_modify)] -#![feature(dyn_trait)] extern crate arena; extern crate getopts; From b80472d84c4b5b28fd22c5ef56af181bbf544c88 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Wed, 25 Apr 2018 10:38:15 -0500 Subject: [PATCH 8/9] fixed tests --- src/test/compile-fail/impl-trait/where-allowed.rs | 3 --- src/test/ui/impl_trait_projections.rs | 3 --- src/test/ui/impl_trait_projections.stderr | 10 +++++----- .../ui/in-band-lifetimes/impl/dyn-trait.nll.stderr | 4 ++-- .../dyn-trait-underscore.nll.stderr | 10 +++++----- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/test/compile-fail/impl-trait/where-allowed.rs b/src/test/compile-fail/impl-trait/where-allowed.rs index f7b331238c6dd..2891cd59e3e1f 100644 --- a/src/test/compile-fail/impl-trait/where-allowed.rs +++ b/src/test/compile-fail/impl-trait/where-allowed.rs @@ -10,9 +10,6 @@ //! A simple test for testing many permutations of allowedness of //! impl Trait - -#![feature(conservative_impl_trait, universal_impl_trait)] - use std::fmt::Debug; // Allowed diff --git a/src/test/ui/impl_trait_projections.rs b/src/test/ui/impl_trait_projections.rs index e8f39e169ff9a..57a0040600a25 100644 --- a/src/test/ui/impl_trait_projections.rs +++ b/src/test/ui/impl_trait_projections.rs @@ -7,9 +7,6 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. - -#![feature(conservative_impl_trait, universal_impl_trait)] - use std::fmt::Debug; use std::option; diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index f0fe1a9754a95..f6d58984ecef7 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -1,29 +1,29 @@ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:24:51 + --> $DIR/impl_trait_projections.rs:21:51 | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:31:9 + --> $DIR/impl_trait_projections.rs:28:9 | LL | -> ::Item | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:38:27 + --> $DIR/impl_trait_projections.rs:35:27 | LL | -> <::std::ops::Range as Iterator>::Item | ^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters - --> $DIR/impl_trait_projections.rs:45:29 + --> $DIR/impl_trait_projections.rs:42:29 | LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type - --> $DIR/impl_trait_projections.rs:24:50 + --> $DIR/impl_trait_projections.rs:21:50 | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type diff --git a/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr b/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr index ec8c4ecf10246..4cf7feddd4654 100644 --- a/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr +++ b/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr @@ -1,11 +1,11 @@ warning: not reporting region error due to nll - --> $DIR/dyn-trait.rs:33:16 + --> $DIR/dyn-trait.rs:32:16 | LL | static_val(x); //~ ERROR cannot infer | ^ error: free region `'a` does not outlive free region `'static` - --> $DIR/dyn-trait.rs:33:5 + --> $DIR/dyn-trait.rs:32:5 | LL | static_val(x); //~ ERROR cannot infer | ^^^^^^^^^^^^^ diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr index 10a03786d7b1f..cdc0c78e69414 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr @@ -1,29 +1,29 @@ warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:20:14 + --> $DIR/dyn-trait-underscore.rs:18:14 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^ warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:20:20 + --> $DIR/dyn-trait-underscore.rs:18:20 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^ warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:20:5 + --> $DIR/dyn-trait-underscore.rs:18:5 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^^^^ warning: not reporting region error due to nll - --> $DIR/dyn-trait-underscore.rs:20:5 + --> $DIR/dyn-trait-underscore.rs:18:5 | LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^^^^^^^^^^^^^^^^^^ error: free region `` does not outlive free region `'static` - --> $DIR/dyn-trait-underscore.rs:18:52 + --> $DIR/dyn-trait-underscore.rs:16:52 | LL | fn a(items: &[T]) -> Box> { | ____________________________________________________^ From b5c7cbf2f288967f55f8155a1ded7379ee4161f0 Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Wed, 25 Apr 2018 12:55:21 -0500 Subject: [PATCH 9/9] rustdoc asks for dyn_trait feature in stage0 --- src/librustdoc/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 1819c7eb7d15f..00153061fd5e9 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -13,6 +13,8 @@ html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/")] +#![cfg_attr(stage0, feature(dyn_trait))] + #![feature(ascii_ctype)] #![feature(rustc_private)] #![feature(box_patterns)]