1
Fork 0

Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakis

Stabilize dyn trait

This PR stabilizes RFC 2113. I followed the [stabilization guide](https://forge.rust-lang.org/stabilization-guide.html).

Related issue: https://github.com/rust-lang/rust/issues/49218
This commit is contained in:
kennytm 2018-04-28 03:32:12 +08:00 committed by GitHub
commit 8b36d9abaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 155 additions and 214 deletions

View file

@ -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(

View file

@ -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))]

View file

@ -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)]

View file

@ -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,7 +83,6 @@ 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)]
#[macro_use] extern crate log;

View file

@ -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)]
@ -23,7 +25,6 @@
#![feature(test)]
#![feature(vec_remove_item)]
#![feature(entry_and_modify)]
#![feature(dyn_trait)]
extern crate arena;
extern crate getopts;

View file

@ -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.27.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)

View file

@ -10,7 +10,6 @@
//! A simple test for testing many permutations of allowedness of
//! impl Trait
#![feature(dyn_trait)]
use std::fmt::Debug;
// Allowed

View file

@ -11,7 +11,6 @@
// compile-flags: -Z borrowck=mir
#![allow(dead_code)]
#![feature(dyn_trait)]
use std::fmt::Debug;

View file

@ -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;

View file

@ -11,8 +11,6 @@
// compile-pass
// failure-status: 1
#![feature(dyn_trait)]
use std::error::Error;
use std::io;

View file

@ -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;

View file

@ -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<dyn Error>> {

View file

@ -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 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
trait Trait {}
type A = Box<dyn Trait>; //~ ERROR `dyn Trait` syntax is unstable
fn main() {}

View file

@ -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<dyn Trait>; //~ 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`.

View file

@ -7,8 +7,6 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(dyn_trait)]
use std::fmt::Debug;
use std::option;

View file

@ -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:21:51
|
LL | fn projection_is_disallowed(x: impl Iterator) -> <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:28:9
|
LL | -> <impl Iterator as Iterator>::Item
| ^^^^^^^^^^^^^
error[E0667]: `impl Trait` is not allowed in path parameters
--> $DIR/impl_trait_projections.rs:37:27
--> $DIR/impl_trait_projections.rs:35:27
|
LL | -> <::std::ops::Range<impl Debug> 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:42:29
|
LL | -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
| ^^^^^^^^^^
error[E0223]: ambiguous associated type
--> $DIR/impl_trait_projections.rs:23:50
--> $DIR/impl_trait_projections.rs:21:50
|
LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
| ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type

View file

@ -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
| ^^^^^^^^^^^^^

View file

@ -13,7 +13,6 @@
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(in_band_lifetimes)]
use std::fmt::Debug;

View file

@ -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<dyn Debug + 'a>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -15,7 +15,6 @@
// Iterator>::Item`, to be exact).
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
trait Anything { }

View file

@ -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 <T as std::iter::Iterator>::Item: '_#2r
error[E0309]: the associated type `<T as std::iter::Iterator>::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 `<T as std::iter::Iterator>::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<T>) -> Box<dyn Anything + 'a>
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 <T as std::iter::Iterator>::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<T>) -> Box<dyn Anything + 'a>
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 <T as std::iter::Iterator>::Item: '_#3r
error[E0309]: the associated type `<T as std::iter::Iterator>::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 `<T as std::iter::Iterator>::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<T>) -> Box<dyn Anything + 'a>
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 <T as std::iter::Iterator>::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<T>) -> Box<dyn Anything + 'a>
LL | | where

View file

@ -11,7 +11,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
trait Anything { }

View file

@ -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 `<T as std::iter::Iterator>::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 `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...
error[E0309]: the associated type `<T as std::iter::Iterator>::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())
| ^^^^^^^^^^^^^^^^^^

View file

@ -25,7 +25,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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

View file

@ -17,7 +17,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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

View file

@ -16,7 +16,6 @@
// compile-pass
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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

View file

@ -18,7 +18,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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 <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r
error[E0309]: the associated type `<T as Anything<'_#5r, '_#6r>>::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 `<T as Anything<'_#5r, '_#6r>>::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 <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::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 `<T as Anything<'_#6r, '_#7r>>::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 <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::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 `<T as Anything<'_#6r, '_#7r>>::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 <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::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 <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::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 <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::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 <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::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 <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::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

View file

@ -11,7 +11,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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<T>(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));

View file

@ -11,7 +11,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::fmt::Debug;

View file

@ -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<T>) -> Box<dyn Debug + 'a>
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
| ^

View file

@ -15,7 +15,6 @@
// compile-flags:-Zborrowck=mir -Zverbose
#![allow(warnings)]
#![feature(dyn_trait)]
#![feature(rustc_attrs)]
use std::cell::Cell;

View file

@ -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

View file

@ -15,7 +15,6 @@
#![feature(nll)]
#![allow(warnings)]
#![feature(dyn_trait)]
use std::cell::Cell;

View file

@ -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)
| ^^^^^^^^^^^^^^^^^

View file

@ -14,7 +14,6 @@
// function body.
#![allow(warnings)]
#![feature(dyn_trait)]
use std::cell::Cell;

View file

@ -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)
| ^^^^^^^^^^^^^^^^^

View file

@ -11,7 +11,6 @@
// compile-flags:-Zborrowck=mir
#![allow(warnings)]
#![feature(dyn_trait)]
use std::fmt::Debug;

View file

@ -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
| ^

View file

@ -10,7 +10,6 @@
// compile-flags: -Z parse-only
#![feature(dyn_trait)]
#![feature(raw_identifiers)]
fn test_if() {

View file

@ -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

View file

@ -13,8 +13,6 @@
//
// cc #48468
#![feature(dyn_trait)]
use std::fmt::Debug;
struct Foo {

View file

@ -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<dyn Debug + '_>, //~ 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<dyn Debug + '_>, //~ ERROR missing lifetime specifier
| ^^^^^^^^^^^^^^

View file

@ -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<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
| ____________________________________________________^

View file

@ -13,8 +13,6 @@
//
// cc #48468
#![feature(dyn_trait)]
fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
// ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static`
Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime

View file

@ -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<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
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
| ^^^^^