1
Fork 0

Auto merge of #87540 - JohnTitor:rollup-8xc6bl5, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #87315 (Add docs for raw-dylib to unstable book)
 - #87330 (Use hashbrown's `extend_reserve()` in `HashMap`)
 - #87443 (Don't treat git repos as non-existent when `ignore_git` is set)
 - #87453 (Suggest removing unnecessary &mut as help message)
 - #87500 (Document math behind MIN/MAX consts on integers)
 - #87501 (Remove min_type_alias_impl_trait in favor of type_alias_impl_trait)
 - #87507 (SGX mutex is *not* moveable)
 - #87513 (bootstrap.py: change `git log` option to indicate desired behavior)
 - #87523 (Stop creating a reference then immediately dereferencing it.)
 - #87524 (Fix ICE in `diagnostic_hir_wf_check`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2021-07-28 16:59:00 +00:00
commit a28109a767
393 changed files with 1125 additions and 5197 deletions

View file

@ -287,7 +287,7 @@ impl<'a> PostExpansionVisitor<'a> {
if let ast::TyKind::ImplTrait(..) = ty.kind { if let ast::TyKind::ImplTrait(..) = ty.kind {
gate_feature_post!( gate_feature_post!(
&self.vis, &self.vis,
min_type_alias_impl_trait, type_alias_impl_trait,
ty.span, ty.span,
"`impl Trait` in type aliases is unstable" "`impl Trait` in type aliases is unstable"
); );

View file

@ -21,7 +21,8 @@
#![feature(iter_map_while)] #![feature(iter_map_while)]
#![feature(maybe_uninit_uninit_array)] #![feature(maybe_uninit_uninit_array)]
#![feature(min_specialization)] #![feature(min_specialization)]
#![feature(min_type_alias_impl_trait)] #![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(new_uninit)] #![feature(new_uninit)]
#![feature(nll)] #![feature(nll)]
#![feature(once_cell)] #![feature(once_cell)]

View file

@ -486,7 +486,7 @@ declare_features! (
(active, async_closure, "1.37.0", Some(62290), None), (active, async_closure, "1.37.0", Some(62290), None),
/// Allows `impl Trait` to be used inside type aliases (RFC 2515). /// Allows `impl Trait` to be used inside type aliases (RFC 2515).
(incomplete, type_alias_impl_trait, "1.38.0", Some(63063), None), (active, type_alias_impl_trait, "1.38.0", Some(63063), None),
/// Allows the definition of `const extern fn` and `const unsafe extern fn`. /// Allows the definition of `const extern fn` and `const unsafe extern fn`.
(active, const_extern_fn, "1.40.0", Some(64926), None), (active, const_extern_fn, "1.40.0", Some(64926), None),
@ -619,9 +619,6 @@ declare_features! (
/// Allows macro attributes to observe output of `#[derive]`. /// Allows macro attributes to observe output of `#[derive]`.
(active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None), (active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None),
/// Allows the use of type alias impl trait in function return positions
(active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),
/// Allows associated types in inherent impls. /// Allows associated types in inherent impls.
(incomplete, inherent_associated_types, "1.52.0", Some(8995), None), (incomplete, inherent_associated_types, "1.52.0", Some(8995), None),

View file

@ -111,7 +111,7 @@ declare_features! (
Some("subsumed by `.await` syntax")), Some("subsumed by `.await` syntax")),
/// Allows defining `existential type`s. /// Allows defining `existential type`s.
(removed, existential_type, "1.38.0", Some(63063), None, (removed, existential_type, "1.38.0", Some(63063), None,
Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")), Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
/// Allows using the macros: /// Allows using the macros:
/// + `__diagnostic_used` /// + `__diagnostic_used`
/// + `__register_diagnostic` /// + `__register_diagnostic`
@ -152,6 +152,10 @@ declare_features! (
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None, (removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")), Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
/// Allows the use of type alias impl trait in function return positions
(removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None,
Some("removed in favor of full type_alias_impl_trait")),
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// feature-group-end: removed features // feature-group-end: removed features
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------

View file

@ -242,7 +242,12 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
.unwrap_or(false) => .unwrap_or(false) =>
{ {
err.span_label(span, format!("cannot {ACT}", ACT = act)); err.span_label(span, format!("cannot {ACT}", ACT = act));
err.span_label(span, "try removing `&mut` here"); err.span_suggestion(
span,
"try removing `&mut` here",
String::new(),
Applicability::MaybeIncorrect,
);
} }
// We want to suggest users use `let mut` for local (user // We want to suggest users use `let mut` for local (user
@ -324,7 +329,12 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
} => } =>
{ {
err.span_label(span, format!("cannot {ACT}", ACT = act)); err.span_label(span, format!("cannot {ACT}", ACT = act));
err.span_label(span, "try removing `&mut` here"); err.span_suggestion(
span,
"try removing `&mut` here",
String::new(),
Applicability::MaybeIncorrect,
);
} }
PlaceRef { local, projection: [ProjectionElem::Deref] } PlaceRef { local, projection: [ProjectionElem::Deref] }

View file

@ -240,8 +240,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
let mut err = match *error { let mut err = match *error {
SelectionError::Unimplemented => { SelectionError::Unimplemented => {
// If this obligation was generated as a result of well-formed checking, see if we // If this obligation was generated as a result of well-formedness checking, see if we
// can get a better error message by performing HIR-based well formed checking. // can get a better error message by performing HIR-based well-formedness checking.
if let ObligationCauseCode::WellFormed(Some(wf_loc)) = if let ObligationCauseCode::WellFormed(Some(wf_loc)) =
root_obligation.cause.code.peel_derives() root_obligation.cause.code.peel_derives()
{ {

View file

@ -38,20 +38,20 @@ fn diagnostic_hir_wf_check<'tcx>(
// given the type `Option<MyStruct<u8>>`, we will check // given the type `Option<MyStruct<u8>>`, we will check
// `Option<MyStruct<u8>>`, `MyStruct<u8>`, and `u8`. // `Option<MyStruct<u8>>`, `MyStruct<u8>`, and `u8`.
// For each type, we perform a well-formed check, and see if we get // For each type, we perform a well-formed check, and see if we get
// an erorr that matches our expected predicate. We keep save // an error that matches our expected predicate. We save
// the `ObligationCause` corresponding to the *innermost* type, // the `ObligationCause` corresponding to the *innermost* type,
// which is the most specific type that we can point to. // which is the most specific type that we can point to.
// In general, the different components of an `hir::Ty` may have // In general, the different components of an `hir::Ty` may have
// completely differentr spans due to macro invocations. Pointing // completely different spans due to macro invocations. Pointing
// to the most accurate part of the type can be the difference // to the most accurate part of the type can be the difference
// between a useless span (e.g. the macro invocation site) // between a useless span (e.g. the macro invocation site)
// and a useful span (e.g. a user-provided type passed in to the macro). // and a useful span (e.g. a user-provided type passed into the macro).
// //
// This approach is quite inefficient - we redo a lot of work done // This approach is quite inefficient - we redo a lot of work done
// by the normal WF checker. However, this code is run at most once // by the normal WF checker. However, this code is run at most once
// per reported error - it will have no impact when compilation succeeds, // per reported error - it will have no impact when compilation succeeds,
// and should only have an impact if a very large number of errors are // and should only have an impact if a very large number of errors is
// displaydd to the user. // displayed to the user.
struct HirWfCheck<'tcx> { struct HirWfCheck<'tcx> {
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,
predicate: ty::Predicate<'tcx>, predicate: ty::Predicate<'tcx>,
@ -126,10 +126,12 @@ fn diagnostic_hir_wf_check<'tcx>(
WellFormedLoc::Ty(_) => match hir.get(hir_id) { WellFormedLoc::Ty(_) => match hir.get(hir_id) {
hir::Node::ImplItem(item) => match item.kind { hir::Node::ImplItem(item) => match item.kind {
hir::ImplItemKind::TyAlias(ty) => Some(ty), hir::ImplItemKind::TyAlias(ty) => Some(ty),
hir::ImplItemKind::Const(ty, _) => Some(ty),
ref item => bug!("Unexpected ImplItem {:?}", item), ref item => bug!("Unexpected ImplItem {:?}", item),
}, },
hir::Node::TraitItem(item) => match item.kind { hir::Node::TraitItem(item) => match item.kind {
hir::TraitItemKind::Type(_, ty) => ty, hir::TraitItemKind::Type(_, ty) => ty,
hir::TraitItemKind::Const(ty, _) => Some(ty),
ref item => bug!("Unexpected TraitItem {:?}", item), ref item => bug!("Unexpected TraitItem {:?}", item),
}, },
hir::Node::Item(item) => match item.kind { hir::Node::Item(item) => match item.kind {

View file

@ -142,7 +142,8 @@
#![feature(alloc_layout_extra)] #![feature(alloc_layout_extra)]
#![feature(trusted_random_access)] #![feature(trusted_random_access)]
#![feature(try_trait_v2)] #![feature(try_trait_v2)]
#![feature(min_type_alias_impl_trait)] #![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(associated_type_bounds)] #![feature(associated_type_bounds)]
#![feature(slice_group_by)] #![feature(slice_group_by)]
#![feature(decl_macro)] #![feature(decl_macro)]

View file

@ -1,9 +1,10 @@
macro_rules! int_impl { macro_rules! int_impl {
($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $Min:expr, $Max:expr, ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
$rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr, $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
$reversed:expr, $le_bytes:expr, $be_bytes:expr, $reversed:expr, $le_bytes:expr, $be_bytes:expr,
$to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr) => { $to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr) => {
/// The smallest value that can be represented by this integer type. /// The smallest value that can be represented by this integer type,
#[doc = concat!("-2<sup>", $BITS_MINUS_ONE, "</sup>.")]
/// ///
/// # Examples /// # Examples
/// ///
@ -15,7 +16,8 @@ macro_rules! int_impl {
#[stable(feature = "assoc_int_consts", since = "1.43.0")] #[stable(feature = "assoc_int_consts", since = "1.43.0")]
pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self; pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self;
/// The largest value that can be represented by this integer type. /// The largest value that can be represented by this integer type,
#[doc = concat!("2<sup>", $BITS_MINUS_ONE, "</sup> - 1.")]
/// ///
/// # Examples /// # Examples
/// ///

View file

@ -91,26 +91,26 @@ depending on the target pointer size.
#[lang = "i8"] #[lang = "i8"]
impl i8 { impl i8 {
int_impl! { i8, i8, u8, 8, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48", int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
"[0x12]", "[0x12]", "", "" } "[0x12]", "[0x12]", "", "" }
} }
#[lang = "i16"] #[lang = "i16"]
impl i16 { impl i16 {
int_impl! { i16, i16, u16, 16, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412", int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
"0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "" } "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "" }
} }
#[lang = "i32"] #[lang = "i32"]
impl i32 { impl i32 {
int_impl! { i32, i32, u32, 32, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
"0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
"[0x12, 0x34, 0x56, 0x78]", "", "" } "[0x12, 0x34, 0x56, 0x78]", "", "" }
} }
#[lang = "i64"] #[lang = "i64"]
impl i64 { impl i64 {
int_impl! { i64, i64, u64, 64, -9223372036854775808, 9223372036854775807, 12, int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
"0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412", "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
"0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]", "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "" } "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "" }
@ -118,7 +118,7 @@ impl i64 {
#[lang = "i128"] #[lang = "i128"]
impl i128 { impl i128 {
int_impl! { i128, i128, u128, 128, -170141183460469231731687303715884105728, int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
170141183460469231731687303715884105727, 16, 170141183460469231731687303715884105727, 16,
"0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012", "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
"0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48", "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
@ -131,7 +131,7 @@ impl i128 {
#[cfg(target_pointer_width = "16")] #[cfg(target_pointer_width = "16")]
#[lang = "isize"] #[lang = "isize"]
impl isize { impl isize {
int_impl! { isize, i16, usize, 16, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", int_impl! { isize, i16, usize, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234",
"0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]",
usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() } usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() }
} }
@ -139,7 +139,7 @@ impl isize {
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[lang = "isize"] #[lang = "isize"]
impl isize { impl isize {
int_impl! { isize, i32, usize, 32, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", int_impl! { isize, i32, usize, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
"0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
"[0x12, 0x34, 0x56, 0x78]", "[0x12, 0x34, 0x56, 0x78]",
usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() } usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() }
@ -148,7 +148,7 @@ impl isize {
#[cfg(target_pointer_width = "64")] #[cfg(target_pointer_width = "64")]
#[lang = "isize"] #[lang = "isize"]
impl isize { impl isize {
int_impl! { isize, i64, usize, 64, -9223372036854775808, 9223372036854775807, int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412", 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
"0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]", "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",

View file

@ -15,7 +15,8 @@ macro_rules! uint_impl {
#[stable(feature = "assoc_int_consts", since = "1.43.0")] #[stable(feature = "assoc_int_consts", since = "1.43.0")]
pub const MIN: Self = 0; pub const MIN: Self = 0;
/// The largest value that can be represented by this integer type. /// The largest value that can be represented by this integer type,
#[doc = concat!("2<sup>", $BITS, "</sup> - 1.")]
/// ///
/// # Examples /// # Examples
/// ///

View file

@ -812,12 +812,12 @@ pub trait RangeBounds<T: ?Sized> {
U: ?Sized + PartialOrd<T>, U: ?Sized + PartialOrd<T>,
{ {
(match self.start_bound() { (match self.start_bound() {
Included(ref start) => *start <= item, Included(start) => start <= item,
Excluded(ref start) => *start < item, Excluded(start) => start < item,
Unbounded => true, Unbounded => true,
}) && (match self.end_bound() { }) && (match self.end_bound() {
Included(ref end) => item <= *end, Included(end) => item <= end,
Excluded(ref end) => item < *end, Excluded(end) => item < end,
Unbounded => true, Unbounded => true,
}) })
} }

View file

@ -2821,15 +2821,7 @@ where
#[inline] #[inline]
fn extend_reserve(&mut self, additional: usize) { fn extend_reserve(&mut self, additional: usize) {
// self.base.extend_reserve(additional); self.base.extend_reserve(additional);
// FIXME: hashbrown should implement this method.
// But until then, use the same reservation logic:
// Reserve the entire hint lower bound if the map is empty.
// Otherwise reserve half the hint (rounded up), so the map
// will only resize twice in the worst case.
let reserve = if self.is_empty() { additional } else { (additional + 1) / 2 };
self.base.reserve(reserve);
} }
} }

View file

@ -8,7 +8,8 @@ pub struct Mutex {
inner: SpinMutex<WaitVariable<bool>>, inner: SpinMutex<WaitVariable<bool>>,
} }
pub type MovableMutex = Mutex; // not movable: see UnsafeList implementation
pub type MovableMutex = Box<Mutex>;
// Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28 // Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
impl Mutex { impl Mutex {

View file

@ -23,6 +23,7 @@ impl<T> UnsafeListEntry<T> {
} }
} }
// WARNING: self-referential struct!
pub struct UnsafeList<T> { pub struct UnsafeList<T> {
head_tail: NonNull<UnsafeListEntry<T>>, head_tail: NonNull<UnsafeListEntry<T>>,
head_tail_entry: Option<UnsafeListEntry<T>>, head_tail_entry: Option<UnsafeListEntry<T>>,

View file

@ -473,7 +473,7 @@ class RustBuild(object):
]).decode(sys.getdefaultencoding()).strip() ]).decode(sys.getdefaultencoding()).strip()
llvm_sha = subprocess.check_output([ llvm_sha = subprocess.check_output([
"git", "log", "--author=bors", "--format=%H", "-n1", "git", "log", "--author=bors", "--format=%H", "-n1",
"-m", "--first-parent", "--no-patch", "--first-parent",
"--", "--",
"{}/src/llvm-project".format(top_level), "{}/src/llvm-project".format(top_level),
"{}/src/bootstrap/download-ci-llvm-stamp".format(top_level), "{}/src/bootstrap/download-ci-llvm-stamp".format(top_level),

View file

@ -12,11 +12,16 @@ use build_helper::output;
use crate::Build; use crate::Build;
pub struct GitInfo { pub enum GitInfo {
inner: Option<Info>, /// This is not a git repository.
Absent,
/// This is a git repository.
/// If the info should be used (`ignore_git` is false), this will be
/// `Some`, otherwise it will be `None`.
Present(Option<Info>),
} }
struct Info { pub struct Info {
commit_date: String, commit_date: String,
sha: String, sha: String,
short_sha: String, short_sha: String,
@ -25,14 +30,20 @@ struct Info {
impl GitInfo { impl GitInfo {
pub fn new(ignore_git: bool, dir: &Path) -> GitInfo { pub fn new(ignore_git: bool, dir: &Path) -> GitInfo {
// See if this even begins to look like a git dir // See if this even begins to look like a git dir
if ignore_git || !dir.join(".git").exists() { if !dir.join(".git").exists() {
return GitInfo { inner: None }; return GitInfo::Absent;
} }
// Make sure git commands work // Make sure git commands work
match Command::new("git").arg("rev-parse").current_dir(dir).output() { match Command::new("git").arg("rev-parse").current_dir(dir).output() {
Ok(ref out) if out.status.success() => {} Ok(ref out) if out.status.success() => {}
_ => return GitInfo { inner: None }, _ => return GitInfo::Absent,
}
// If we're ignoring the git info, we don't actually need to collect it, just make sure this
// was a git repo in the first place.
if ignore_git {
return GitInfo::Present(None);
} }
// Ok, let's scrape some info // Ok, let's scrape some info
@ -48,30 +59,35 @@ impl GitInfo {
let short_ver_hash = output( let short_ver_hash = output(
Command::new("git").current_dir(dir).arg("rev-parse").arg("--short=9").arg("HEAD"), Command::new("git").current_dir(dir).arg("rev-parse").arg("--short=9").arg("HEAD"),
); );
GitInfo { GitInfo::Present(Some(Info {
inner: Some(Info { commit_date: ver_date.trim().to_string(),
commit_date: ver_date.trim().to_string(), sha: ver_hash.trim().to_string(),
sha: ver_hash.trim().to_string(), short_sha: short_ver_hash.trim().to_string(),
short_sha: short_ver_hash.trim().to_string(), }))
}), }
fn info(&self) -> Option<&Info> {
match self {
GitInfo::Present(info) => info.as_ref(),
GitInfo::Absent => None,
} }
} }
pub fn sha(&self) -> Option<&str> { pub fn sha(&self) -> Option<&str> {
self.inner.as_ref().map(|s| &s.sha[..]) self.info().map(|s| &s.sha[..])
} }
pub fn sha_short(&self) -> Option<&str> { pub fn sha_short(&self) -> Option<&str> {
self.inner.as_ref().map(|s| &s.short_sha[..]) self.info().map(|s| &s.short_sha[..])
} }
pub fn commit_date(&self) -> Option<&str> { pub fn commit_date(&self) -> Option<&str> {
self.inner.as_ref().map(|s| &s.commit_date[..]) self.info().map(|s| &s.commit_date[..])
} }
pub fn version(&self, build: &Build, num: &str) -> String { pub fn version(&self, build: &Build, num: &str) -> String {
let mut version = build.release(num); let mut version = build.release(num);
if let Some(ref inner) = self.inner { if let Some(ref inner) = self.info() {
version.push_str(" ("); version.push_str(" (");
version.push_str(&inner.short_sha); version.push_str(&inner.short_sha);
version.push(' '); version.push(' ');
@ -82,6 +98,9 @@ impl GitInfo {
} }
pub fn is_git(&self) -> bool { pub fn is_git(&self) -> bool {
self.inner.is_some() match self {
GitInfo::Absent => false,
GitInfo::Present(_) => true,
}
} }
} }

View file

@ -1145,7 +1145,7 @@ impl Build {
match &self.config.channel[..] { match &self.config.channel[..] {
"stable" => num.to_string(), "stable" => num.to_string(),
"beta" => { "beta" => {
if self.rust_info.is_git() { if self.rust_info.is_git() && !self.config.ignore_git {
format!("{}-beta.{}", num, self.beta_prerelease_version()) format!("{}-beta.{}", num, self.beta_prerelease_version())
} else { } else {
format!("{}-beta", num) format!("{}-beta", num)

View file

@ -0,0 +1,34 @@
# `raw_dylib`
The tracking issue for this feature is: [#58713]
[#58713]: https://github.com/rust-lang/rust/issues/58713
------------------------
The `raw_dylib` feature allows you to link against the implementations of functions in an `extern`
block without, on Windows, linking against an import library.
```rust,ignore (partial-example)
#![feature(raw_dylib)]
#[link(name="library", kind="raw-dylib")]
extern {
fn extern_function(x: i32);
}
fn main() {
unsafe {
extern_function(14);
}
}
```
## Limitations
Currently, this feature is only supported on `-windows-msvc` targets. Non-Windows platforms don't have import
libraries, and an incompatibility between LLVM and the BFD linker means that it is not currently supported on
`-windows-gnu` targets.
On the `i686-pc-windows-msvc` target, this feature supports only the `cdecl`, `stdcall`, `system`, and `fastcall`
calling conventions.

View file

@ -2,7 +2,7 @@
// check-pass // check-pass
#![feature(trait_alias)] #![feature(trait_alias)]
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
/// look at this trait right here /// look at this trait right here
pub trait ThisTrait { pub trait ThisTrait {

View file

@ -1,5 +1,5 @@
// check-pass // check-pass
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
pub trait ValidTrait {} pub trait ValidTrait {}
type ImplTrait = impl ValidTrait; type ImplTrait = impl ValidTrait;

View file

@ -1,5 +1,5 @@
// check-pass // check-pass
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
pub trait ValidTrait {} pub trait ValidTrait {}
type ImplTrait = impl ValidTrait; type ImplTrait = impl ValidTrait;

View file

@ -1,6 +1,6 @@
//edition:2018 //edition:2018
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
pub trait Foo { pub trait Foo {
type X: std::future::Future<Output = ()>; type X: std::future::Future<Output = ()>;

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
trait MyTrait {} trait MyTrait {}
impl MyTrait for i32 {} impl MyTrait for i32 {}

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
pub trait Backend {} pub trait Backend {}

View file

@ -1,492 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/duplicate.rs:4:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:10:36
|
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:12:36
|
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:14:39
|
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:16:45
|
LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:18:45
|
LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:20:48
|
LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:23:34
|
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:25:34
|
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:27:37
|
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:29:43
|
LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:31:43
|
LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:33:46
|
LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:36:35
|
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:38:35
|
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:40:38
|
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:42:44
|
LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:44:44
|
LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:46:47
|
LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:49:32
|
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:51:32
|
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:53:35
|
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:55:43
|
LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:57:43
|
LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:59:46
|
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:65:40
|
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:67:40
|
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:69:43
|
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:72:35
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:74:35
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:76:38
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:78:44
|
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:80:44
|
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:82:47
|
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:85:36
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:87:36
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:89:39
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:91:40
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:93:40
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:95:43
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:98:36
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:100:36
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:102:39
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:104:34
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:106:34
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:108:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:110:45
|
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:112:45
|
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:114:48
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:132:40
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:134:44
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:136:43
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:125:43
|
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:127:43
|
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:129:46
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error: aborting due to 60 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0719`.

View file

@ -1,50 +1,110 @@
#![feature(associated_type_bounds)] #![feature(associated_type_bounds)]
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(untagged_unions)] #![feature(untagged_unions)]
use std::iter; use std::iter;
struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T } struct SI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
struct SW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
struct SW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
struct SW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) } enum EI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) } V(T),
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) } enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) } V(T),
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) } enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) } V(T),
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
enum EW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
enum EW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
enum EW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T } union UI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } union UI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } union UI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } f: T,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
union UW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
union UW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
union UW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
fn FI1<T: Iterator<Item: Copy, Item: Send>>() {} fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
@ -52,16 +112,34 @@ fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {} fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {} fn FW1<T>()
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] where
fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {} T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {} {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
fn FW2<T>()
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
fn FW3<T>()
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() } fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() } iter::empty()
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty() } }
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
iter::empty()
}
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
iter::empty()
}
fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {} fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {} fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
@ -75,12 +153,21 @@ type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T; type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T; type TAW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T; = T;
type TAW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T; = T;
type TAW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
= T;
type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy; type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
@ -107,27 +194,57 @@ trait TRS2: Iterator<Item: Copy, Item: Copy> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRS3: Iterator<Item: 'static, Item: 'static> {} trait TRS3: Iterator<Item: 'static, Item: 'static> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {} trait TRW1<T>
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] where
trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {} T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {} {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {} trait TRW2<T>
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] where
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] T: Iterator<Item: Copy, Item: Copy>,
trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] {
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] }
trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {} trait TRW3<T>
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] where
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] T: Iterator<Item: 'static, Item: 'static>,
trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; } //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] {
trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; } }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRSW1
trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; } where
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] Self: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRSW2
where
Self: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRSW3
where
Self: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRA1 {
type A: Iterator<Item: Copy, Item: Send>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
trait TRA2 {
type A: Iterator<Item: Copy, Item: Copy>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
trait TRA3 {
type A: Iterator<Item: 'static, Item: 'static>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
type TADyn1 = dyn Iterator<Item: Copy, Item: Send>; type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]

View file

@ -1,149 +1,149 @@
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:10:36 --> $DIR/duplicate.rs:7:36
| |
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T } LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:12:36 --> $DIR/duplicate.rs:11:36
| |
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:14:39 --> $DIR/duplicate.rs:15:39
| |
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:16:45 --> $DIR/duplicate.rs:21:29
| |
LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:18:45 --> $DIR/duplicate.rs:28:29
| |
LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:20:48 --> $DIR/duplicate.rs:35:32
| |
LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:23:34 --> $DIR/duplicate.rs:41:34
| |
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) } LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:25:34 --> $DIR/duplicate.rs:45:34
| |
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) } LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:27:37 --> $DIR/duplicate.rs:49:37
| |
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) } LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:29:43 --> $DIR/duplicate.rs:55:29
| |
LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) } LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:31:43 --> $DIR/duplicate.rs:62:29
| |
LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) } LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:33:46 --> $DIR/duplicate.rs:69:32
| |
LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) } LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:36:35 --> $DIR/duplicate.rs:75:35
| |
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T } LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:38:35 --> $DIR/duplicate.rs:79:35
| |
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:40:38 --> $DIR/duplicate.rs:83:38
| |
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:42:44 --> $DIR/duplicate.rs:89:29
| |
LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:44:44 --> $DIR/duplicate.rs:96:29
| |
LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:46:47 --> $DIR/duplicate.rs:103:32
| |
LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:49:32 --> $DIR/duplicate.rs:109:32
| |
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {} LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -151,7 +151,7 @@ LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:51:32 --> $DIR/duplicate.rs:111:32
| |
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {} LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -159,7 +159,7 @@ LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:53:35 --> $DIR/duplicate.rs:113:35
| |
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {} LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -167,31 +167,31 @@ LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:55:43 --> $DIR/duplicate.rs:117:29
| |
LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {} LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:57:43 --> $DIR/duplicate.rs:123:29
| |
LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {} LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:59:46 --> $DIR/duplicate.rs:129:32
| |
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {} LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:65:40 --> $DIR/duplicate.rs:143:40
| |
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {} LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -199,7 +199,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:67:40 --> $DIR/duplicate.rs:145:40
| |
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {} LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -207,7 +207,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:69:43 --> $DIR/duplicate.rs:147:43
| |
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {} LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -215,7 +215,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:72:35 --> $DIR/duplicate.rs:150:35
| |
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T; LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -223,7 +223,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:74:35 --> $DIR/duplicate.rs:152:35
| |
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T; LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -231,7 +231,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:76:38 --> $DIR/duplicate.rs:154:38
| |
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T; LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -239,31 +239,31 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:78:44 --> $DIR/duplicate.rs:158:29
| |
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T; LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:80:44 --> $DIR/duplicate.rs:163:29
| |
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T; LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:82:47 --> $DIR/duplicate.rs:168:32
| |
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T; LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:85:36 --> $DIR/duplicate.rs:172:36
| |
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy; LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -271,7 +271,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:87:36 --> $DIR/duplicate.rs:174:36
| |
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy; LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -279,7 +279,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:89:39 --> $DIR/duplicate.rs:176:39
| |
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy; LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -287,7 +287,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:91:40 --> $DIR/duplicate.rs:178:40
| |
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>; LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -295,7 +295,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:93:40 --> $DIR/duplicate.rs:180:40
| |
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>; LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -303,7 +303,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:95:43 --> $DIR/duplicate.rs:182:43
| |
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>; LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -311,7 +311,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:98:36 --> $DIR/duplicate.rs:185:36
| |
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {} LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -319,7 +319,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:100:36 --> $DIR/duplicate.rs:187:36
| |
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {} LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -327,7 +327,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:102:39 --> $DIR/duplicate.rs:189:39
| |
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {} LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -335,7 +335,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:104:34 --> $DIR/duplicate.rs:191:34
| |
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {} LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -343,7 +343,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:106:34 --> $DIR/duplicate.rs:193:34
| |
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {} LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -351,7 +351,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:108:37 --> $DIR/duplicate.rs:195:37
| |
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {} LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -359,79 +359,79 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:110:45 --> $DIR/duplicate.rs:199:29
| |
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {} LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:112:45 --> $DIR/duplicate.rs:205:29
| |
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {} LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:114:48 --> $DIR/duplicate.rs:211:32
| |
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {} LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46 --> $DIR/duplicate.rs:217:32
| |
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {} LL | Self: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46 --> $DIR/duplicate.rs:217:32
| |
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {} LL | Self: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46 --> $DIR/duplicate.rs:224:32
| |
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {} LL | Self: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46 --> $DIR/duplicate.rs:224:32
| |
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {} LL | Self: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49 --> $DIR/duplicate.rs:231:35
| |
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {} LL | Self: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49 --> $DIR/duplicate.rs:231:35
| |
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {} LL | Self: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:132:40 --> $DIR/duplicate.rs:249:40
| |
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>; LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -439,7 +439,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:134:44 --> $DIR/duplicate.rs:251:44
| |
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>; LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
@ -447,7 +447,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:136:43 --> $DIR/duplicate.rs:253:43
| |
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>; LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
@ -455,28 +455,28 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:125:43 --> $DIR/duplicate.rs:237:34
| |
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; } LL | type A: Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:127:43 --> $DIR/duplicate.rs:241:34
| |
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; } LL | type A: Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here | ---------- ^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:129:46 --> $DIR/duplicate.rs:245:37
| |
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; } LL | type A: Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here | ------------- ^^^^^^^^^^^^^ re-bound here
| | | |
| `Item` bound here first | `Item` bound here first
error: aborting due to 60 previous errors error: aborting due to 60 previous errors

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/trait-alias-impl-trait.rs:6:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,39 +1,59 @@
// run-pass // run-pass
#![feature(associated_type_bounds)] #![feature(associated_type_bounds)]
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
use std::ops::Add; use std::ops::Add;
trait Tr1 { type As1; fn mk(self) -> Self::As1; } trait Tr1 {
trait Tr2<'a> { fn tr2(self) -> &'a Self; } type As1;
fn mk(self) -> Self::As1;
}
trait Tr2<'a> {
fn tr2(self) -> &'a Self;
}
fn assert_copy<T: Copy>(x: T) { let _x = x; let _x = x; } fn assert_copy<T: Copy>(x: T) {
let _x = x;
let _x = x;
}
fn assert_static<T: 'static>(_: T) {} fn assert_static<T: 'static>(_: T) {}
fn assert_forall_tr2<T: for<'a> Tr2<'a>>(_: T) {} fn assert_forall_tr2<T: for<'a> Tr2<'a>>(_: T) {}
struct S1; struct S1;
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
struct S2; struct S2;
impl Tr1 for S1 { type As1 = S2; fn mk(self) -> Self::As1 { S2 } } impl Tr1 for S1 {
type As1 = S2;
fn mk(self) -> Self::As1 {
S2
}
}
type Et1 = impl Tr1<As1: Copy>; type Et1 = impl Tr1<As1: Copy>;
fn def_et1() -> Et1 { S1 } fn def_et1() -> Et1 {
pub fn use_et1() { assert_copy(def_et1().mk()); } S1
}
pub fn use_et1() {
assert_copy(def_et1().mk());
}
type Et2 = impl Tr1<As1: 'static>; type Et2 = impl Tr1<As1: 'static>;
fn def_et2() -> Et2 { S1 } fn def_et2() -> Et2 {
pub fn use_et2() { assert_static(def_et2().mk()); } S1
}
pub fn use_et2() {
assert_static(def_et2().mk());
}
type Et3 = impl Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>; type Et3 = impl Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>;
fn def_et3() -> Et3 { fn def_et3() -> Et3 {
struct A; struct A;
impl Tr1 for A { impl Tr1 for A {
type As1 = core::ops::Range<u8>; type As1 = core::ops::Range<u8>;
fn mk(self) -> Self::As1 { 0..10 } fn mk(self) -> Self::As1 {
0..10
}
} }
A A
} }
@ -53,14 +73,20 @@ fn def_et4() -> Et4 {
struct A; struct A;
impl Tr1 for A { impl Tr1 for A {
type As1 = A; type As1 = A;
fn mk(self) -> A { A } fn mk(self) -> A {
A
}
} }
impl<'a> Tr2<'a> for A { impl<'a> Tr2<'a> for A {
fn tr2(self) -> &'a Self { &A } fn tr2(self) -> &'a Self {
&A
}
} }
A A
} }
pub fn use_et4() { assert_forall_tr2(def_et4().mk()); } pub fn use_et4() {
assert_forall_tr2(def_et4().mk());
}
fn main() { fn main() {
let _ = use_et1(); let _ = use_et1();

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-63591.rs:6:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,10 +1,7 @@
// check-pass // check-pass
#![feature(associated_type_bounds)] #![feature(associated_type_bounds)]
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
fn main() {} fn main() {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-60655-latebound-regions.rs:8:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -3,10 +3,7 @@
// check-pass // check-pass
// edition:2018 // edition:2018
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
use std::future::Future; use std::future::Future;

View file

@ -3,6 +3,7 @@ fn main() {
match op { match op {
Some(ref v) => { let a = &mut v; }, Some(ref v) => { let a = &mut v; },
//~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
//~| HELP try removing `&mut` here
None => {}, None => {},
} }
} }

View file

@ -5,7 +5,7 @@ LL | Some(ref v) => { let a = &mut v; },
| ^^^^^^ | ^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error: aborting due to previous error error: aborting due to previous error

View file

@ -4,8 +4,10 @@
pub fn f(b: &mut i32) { pub fn f(b: &mut i32) {
g(&mut b); g(&mut b);
//~^ ERROR cannot borrow //~^ ERROR cannot borrow
//~| HELP try removing `&mut` here
g(&mut &mut b); g(&mut &mut b);
//~^ ERROR cannot borrow //~^ ERROR cannot borrow
//~| HELP try removing `&mut` here
} }
pub fn g(_: &mut i32) {} pub fn g(_: &mut i32) {}

View file

@ -5,16 +5,16 @@ LL | g(&mut b);
| ^^^^^^ | ^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
--> $DIR/mut-borrow-of-mut-ref.rs:7:12 --> $DIR/mut-borrow-of-mut-ref.rs:8:12
| |
LL | g(&mut &mut b); LL | g(&mut &mut b);
| ^^^^^^ | ^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -5,13 +5,16 @@ struct Struct;
impl Struct { impl Struct {
fn foo(&mut self) { fn foo(&mut self) {
(&mut self).bar(); //~ ERROR cannot borrow (&mut self).bar(); //~ ERROR cannot borrow
//~^ HELP try removing `&mut` here
} }
// In this case we could keep the suggestion, but to distinguish the // In this case we could keep the suggestion, but to distinguish the
// two cases is pretty hard. It's an obscure case anyway. // two cases is pretty hard. It's an obscure case anyway.
fn bar(self: &mut Self) { fn bar(self: &mut Self) {
//~^ WARN function cannot return without recursing //~^ WARN function cannot return without recursing
//~^^ HELP a `loop` may express intention better if this is on purpose
(&mut self).bar(); //~ ERROR cannot borrow (&mut self).bar(); //~ ERROR cannot borrow
//~^ HELP try removing `&mut` here
} }
} }

View file

@ -5,14 +5,14 @@ LL | (&mut self).bar();
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
warning: function cannot return without recursing warning: function cannot return without recursing
--> $DIR/issue-31424.rs:12:5 --> $DIR/issue-31424.rs:13:5
| |
LL | fn bar(self: &mut Self) { LL | fn bar(self: &mut Self) {
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
LL | ...
LL | (&mut self).bar(); LL | (&mut self).bar();
| ----------------- recursive call site | ----------------- recursive call site
| |
@ -20,13 +20,13 @@ LL | (&mut self).bar();
= help: a `loop` may express intention better if this is on purpose = help: a `loop` may express intention better if this is on purpose
error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
--> $DIR/issue-31424.rs:14:9 --> $DIR/issue-31424.rs:16:9
| |
LL | (&mut self).bar(); LL | (&mut self).bar();
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error: aborting due to 2 previous errors; 1 warning emitted error: aborting due to 2 previous errors; 1 warning emitted

View file

@ -5,6 +5,7 @@ impl Z {
fn start(&mut self) { fn start(&mut self) {
self.run(&mut self); //~ ERROR cannot borrow self.run(&mut self); //~ ERROR cannot borrow
//~| ERROR cannot borrow //~| ERROR cannot borrow
//~| HELP try removing `&mut` here
} }
} }

View file

@ -5,7 +5,7 @@ LL | self.run(&mut self);
| ^^^^^^^^^ | ^^^^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
--> $DIR/issue-34126.rs:6:18 --> $DIR/issue-34126.rs:6:18

View file

@ -4,4 +4,5 @@ fn main() {
let mut v: Vec<String> = Vec::new(); let mut v: Vec<String> = Vec::new();
let ref mut key = v[0]; let ref mut key = v[0];
get(&mut key); //~ ERROR cannot borrow get(&mut key); //~ ERROR cannot borrow
//~| HELP try removing `&mut` here
} }

View file

@ -5,7 +5,7 @@ LL | get(&mut key);
| ^^^^^^^^ | ^^^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error: aborting due to previous error error: aborting due to previous error

View file

@ -10,6 +10,7 @@ fn main() {
match x { match x {
TestEnum::Item(ref mut x) => { TestEnum::Item(ref mut x) => {
test(&mut x); //~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable test(&mut x); //~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable
//~| HELP try removing `&mut` here
} }
} }
} }

View file

@ -5,7 +5,7 @@ LL | test(&mut x);
| ^^^^^^ | ^^^^^^
| | | |
| cannot borrow as mutable | cannot borrow as mutable
| try removing `&mut` here | help: try removing `&mut` here
error: aborting due to previous error error: aborting due to previous error

View file

@ -1,5 +1,5 @@
#![feature(imported_main)] #![feature(imported_main)]
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
#![allow(incomplete_features)] #![allow(incomplete_features)]
//~^^^ ERROR `main` function not found in crate //~^^^ ERROR `main` function not found in crate
pub mod foo { pub mod foo {

View file

@ -2,7 +2,7 @@ error[E0601]: `main` function not found in crate `imported_main_const_fn_item_ty
--> $DIR/imported_main_const_fn_item_type_forbidden.rs:1:1 --> $DIR/imported_main_const_fn_item_type_forbidden.rs:1:1
| |
LL | / #![feature(imported_main)] LL | / #![feature(imported_main)]
LL | | #![feature(min_type_alias_impl_trait)] LL | | #![feature(type_alias_impl_trait)]
LL | | #![allow(incomplete_features)] LL | | #![allow(incomplete_features)]
LL | | LL | |
... | ... |

View file

@ -1,50 +0,0 @@
// ignore-compare-mode-chalk
use std::fmt::Debug;
type Foo = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
trait Bar {
type Baa: Debug;
fn define() -> Self::Baa;
}
impl Bar for () {
type Baa = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
fn define() -> Self::Baa {
0
}
}
fn define() -> Foo {
0
}
trait TraitWithDefault {
type Assoc = impl Debug;
//~^ ERROR associated type defaults are unstable
//~| ERROR `impl Trait` not allowed outside of function
//~| ERROR `impl Trait` in type aliases is unstable
}
type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
//~^ ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
fn define_multiple() -> NestedFree {
(vec![true], 0u8, 0i32..1)
}
impl Bar for u8 {
type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
//~^ ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
fn define() -> Self::Baa {
(vec![true], 0u8, 0i32..1)
}
}
fn main() {}

View file

@ -1,118 +0,0 @@
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:4:12
|
LL | type Foo = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:12:16
|
LL | type Baa = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: associated type defaults are unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:5
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
= help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:24
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:37
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:49
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:70
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:21
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:34
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:46
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:67
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` not allowed outside of function and method return types
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0562, E0658.
For more information about an error, try `rustc --explain E0562`.

View file

@ -1,5 +1,5 @@
// ignore-compare-mode-chalk // ignore-compare-mode-chalk
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
use std::fmt::Debug; use std::fmt::Debug;
type Foo = impl Debug; type Foo = impl Debug;
@ -13,7 +13,7 @@ fn define() -> Bar {
type Foo2 = impl Debug; type Foo2 = impl Debug;
fn define2() { fn define2() {
let x = || -> Foo2 { 42 }; //~ ERROR not permitted here let x = || -> Foo2 { 42 };
} }
type Foo3 = impl Debug; type Foo3 = impl Debug;

View file

@ -10,15 +10,6 @@ LL | Bar(42)
= note: expected opaque type `impl Debug` = note: expected opaque type `impl Debug`
found type `{integer}` found type `{integer}`
error[E0658]: type alias impl trait is not permitted here
--> $DIR/feature-gate-type_alias_impl_trait.rs:16:19
|
LL | let x = || -> Foo2 { 42 };
| ^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/feature-gate-type_alias_impl_trait.rs:23:18 --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
| |
@ -77,7 +68,6 @@ error: could not find defining uses
LL | type Foo4 = impl Debug; LL | type Foo4 = impl Debug;
| ^^^^^^^^^^ | ^^^^^^^^^^
error: aborting due to 8 previous errors error: aborting due to 7 previous errors
Some errors have detailed explanations: E0308, E0658. For more information about this error, try `rustc --explain E0308`.
For more information about an error, try `rustc --explain E0308`.

View file

@ -1,18 +0,0 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:24:17
|
LL | let a = Foo;
| ^^^ not found in this scope
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/layout-error.rs:8:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0425`.

View file

@ -1,19 +0,0 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:24:17
|
LL | let a = Foo;
| ^^^ not found in this scope
error[E0658]: type alias impl trait is not permitted here
--> $DIR/layout-error.rs:30:27
|
LL | Task::spawn(&POOL, || cb());
| ^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0425, E0658.
For more information about an error, try `rustc --explain E0425`.

View file

@ -3,10 +3,7 @@
// //
// edition:2018 // edition:2018
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
use std::future::Future; use std::future::Future;
pub struct Task<F: Future>(F); pub struct Task<F: Future>(F);
@ -27,5 +24,5 @@ fn main() {
type F = impl Future; type F = impl Future;
// Check that statics are inhabited computes they layout. // Check that statics are inhabited computes they layout.
static POOL: Task<F> = Task::new(); static POOL: Task<F> = Task::new();
Task::spawn(&POOL, || cb()); //[min_tait]~ ERROR type alias impl trait is not permitted here Task::spawn(&POOL, || cb());
} }

View file

@ -0,0 +1,9 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:21:17
|
LL | let a = Foo;
| ^^^ not found in this scope
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.

View file

@ -1,17 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/metadata-sufficient-for-layout.rs:10:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error: fatal error triggered by #[rustc_error]
--> $DIR/metadata-sufficient-for-layout.rs:28:1
|
LL | fn main() {}
| ^^^^^^^^^
error: aborting due to previous error; 1 warning emitted

View file

@ -5,10 +5,7 @@
// //
// aux-build:metadata-sufficient-for-layout.rs // aux-build:metadata-sufficient-for-layout.rs
// revisions: min_tait full_tait #![feature(type_alias_impl_trait, rustc_attrs)]
#![feature(min_type_alias_impl_trait, rustc_attrs)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(generator_trait)] #![feature(generator_trait)]
extern crate metadata_sufficient_for_layout; extern crate metadata_sufficient_for_layout;

View file

@ -1,5 +1,5 @@
error: fatal error triggered by #[rustc_error] error: fatal error triggered by #[rustc_error]
--> $DIR/metadata-sufficient-for-layout.rs:28:1 --> $DIR/metadata-sufficient-for-layout.rs:25:1
| |
LL | fn main() {} LL | fn main() {}
| ^^^^^^^^^ | ^^^^^^^^^

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type-generic-trait.rs:3:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
// build-pass (FIXME(62277): could be check-pass?) // build-pass (FIXME(62277): could be check-pass?)
trait Bar {} trait Bar {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type-trivial.rs:3:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
// build-pass (FIXME(62277): could be check-pass?) // build-pass (FIXME(62277): could be check-pass?)
trait Bar {} trait Bar {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type.rs:3:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
// build-pass (FIXME(62277): could be check-pass?) // build-pass (FIXME(62277): could be check-pass?)
trait Bar {} trait Bar {}

View file

@ -1,21 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/auto-trait.rs:5:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/auto-trait.rs:24:1
|
LL | impl<T: Send> AnotherTrait for T {}
| -------------------------------- first implementation here
...
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<impl OpaqueTrait>`
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,9 +1,6 @@
// Tests that type alias impls traits do not leak auto-traits for // Tests that type alias impls traits do not leak auto-traits for
// the purposes of coherence checking // the purposes of coherence checking
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
trait OpaqueTrait {} trait OpaqueTrait {}
impl<T> OpaqueTrait for T {} impl<T> OpaqueTrait for T {}

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>` error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/auto-trait.rs:24:1 --> $DIR/auto-trait.rs:21:1
| |
LL | impl<T: Send> AnotherTrait for T {} LL | impl<T: Send> AnotherTrait for T {}
| -------------------------------- first implementation here | -------------------------------- first implementation here

View file

@ -4,7 +4,7 @@
//[sa] compile-flags: -Z save-analysis //[sa] compile-flags: -Z save-analysis
//-^ To make this the regression test for #75962. //-^ To make this the regression test for #75962.
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
// See issue 60414 // See issue 60414

View file

@ -1,57 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872-1.rs:3:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0276]: impl has stricter requirements than trait
--> $DIR/issue-55872-1.rs:17:5
|
LL | fn foo<T>() -> Self::E;
| ----------------------- definition of `foo` from trait
...
LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound
|
LL | impl<S: Default + std::marker::Copy> Bar for S {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound
|
LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-1.rs:17:37
|
LL | fn foo<T: Default>() -> Self::E {
| _____________________________________^
LL | |
LL | |
LL | | (S::default(), T::default())
LL | | }
| |_____^
error: aborting due to 4 previous errors; 1 warning emitted
Some errors have detailed explanations: E0276, E0277.
For more information about an error, try `rustc --explain E0276`.

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
pub trait Bar { pub trait Bar {
type E: Copy; type E: Copy;

View file

@ -1,5 +1,5 @@
error[E0276]: impl has stricter requirements than trait error[E0276]: impl has stricter requirements than trait
--> $DIR/issue-55872-1.rs:17:5 --> $DIR/issue-55872-1.rs:14:5
| |
LL | fn foo<T>() -> Self::E; LL | fn foo<T>() -> Self::E;
| ----------------------- definition of `foo` from trait | ----------------------- definition of `foo` from trait
@ -8,7 +8,7 @@ LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14 --> $DIR/issue-55872-1.rs:10:14
| |
LL | type E = impl Copy; LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
@ -20,7 +20,7 @@ LL | impl<S: Default + std::marker::Copy> Bar for S {
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14 --> $DIR/issue-55872-1.rs:10:14
| |
LL | type E = impl Copy; LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
@ -32,7 +32,7 @@ LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-1.rs:17:37 --> $DIR/issue-55872-1.rs:14:37
| |
LL | fn foo<T: Default>() -> Self::E { LL | fn foo<T: Default>() -> Self::E {
| _____________________________________^ | _____________________________________^

View file

@ -1,28 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872-2.rs:6:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0277]: the trait bound `impl Future: Copy` is not satisfied
--> $DIR/issue-55872-2.rs:16:14
|
LL | type E = impl std::marker::Copy;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-2.rs:18:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^
LL | |
LL | | async {}
LL | | }
| |_____^
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View file

@ -1,10 +1,7 @@
// edition:2018 // edition:2018
// ignore-compare-mode-chalk // ignore-compare-mode-chalk
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
pub trait Bar { pub trait Bar {
type E: Copy; type E: Copy;

View file

@ -1,11 +1,11 @@
error[E0277]: the trait bound `impl Future: Copy` is not satisfied error[E0277]: the trait bound `impl Future: Copy` is not satisfied
--> $DIR/issue-55872-2.rs:16:14 --> $DIR/issue-55872-2.rs:13:14
| |
LL | type E = impl std::marker::Copy; LL | type E = impl std::marker::Copy;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-2.rs:18:28 --> $DIR/issue-55872-2.rs:15:28
| |
LL | fn foo<T>() -> Self::E { LL | fn foo<T>() -> Self::E {
| ____________________________^ | ____________________________^

View file

@ -1,21 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872.rs:4:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872.rs:16:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^
LL | |
LL | | || ()
LL | | }
| |_____^
error: aborting due to previous error; 1 warning emitted

View file

@ -1,8 +1,5 @@
// ignore-compare-mode-chalk // ignore-compare-mode-chalk
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
pub trait Bar { pub trait Bar {
type E: Copy; type E: Copy;
@ -14,7 +11,7 @@ impl<S> Bar for S {
type E = impl Copy; type E = impl Copy;
fn foo<T>() -> Self::E { fn foo<T>() -> Self::E {
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|| () || ()
} }
} }

View file

@ -1,5 +1,5 @@
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872.rs:16:28 --> $DIR/issue-55872.rs:13:28
| |
LL | fn foo<T>() -> Self::E { LL | fn foo<T>() -> Self::E {
| ____________________________^ | ____________________________^

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
type X<'a, 'b> = impl std::fmt::Debug; type X<'a, 'b> = impl std::fmt::Debug;

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-53457.rs:5:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -1,10 +1,6 @@
// check-pass // check-pass
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
type X = impl Clone; type X = impl Clone;
fn bar<F: Fn(&i32) + Clone>(f: F) -> F { fn bar<F: Fn(&i32) + Clone>(f: F) -> F {

View file

@ -1,15 +0,0 @@
error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
--> $DIR/issue-70877.rs:10:12
|
LL | type FooRet = impl std::fmt::Debug;
| -------------------- the found opaque type
...
LL | type Foo = impl Iterator<Item = FooItem>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type
|
= note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0271`.

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
#![allow(incomplete_features)]
type FooArg<'a> = &'a dyn ToString; type FooArg<'a> = &'a dyn ToString;
type FooRet = impl std::fmt::Debug; type FooRet = impl std::fmt::Debug;

View file

@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>` error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
--> $DIR/issue-70877.rs:10:12 --> $DIR/issue-70877.rs:7:12
| |
LL | type FooRet = impl std::fmt::Debug; LL | type FooRet = impl std::fmt::Debug;
| -------------------- the found opaque type | -------------------- the found opaque type

View file

@ -1,32 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-78722.rs:5:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0308]: mismatched types
--> $DIR/issue-78722.rs:15:20
|
LL | type F = impl core::future::Future<Output = u8>;
| -------------------------------------- the expected opaque type
...
LL | let f: F = async { 1 };
| - ^^^^^^^^^^^ expected opaque type, found a different opaque type
| |
| expected due to this
|
::: $SRC_DIR/core/src/future/mod.rs:LL:COL
|
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
| ------------------------------- the found opaque type
|
= note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>)
found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
= note: distinct uses of `impl Trait` result in different opaque types
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.

View file

@ -1,9 +1,6 @@
// edition:2018 // edition:2018
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
type F = impl core::future::Future<Output = u8>; type F = impl core::future::Future<Output = u8>;

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/issue-78722.rs:15:20 --> $DIR/issue-78722.rs:12:20
| |
LL | type F = impl core::future::Future<Output = u8>; LL | type F = impl core::future::Future<Output = u8>;
| -------------------------------------- the expected opaque type | -------------------------------------- the expected opaque type
@ -14,7 +14,7 @@ LL | let f: F = async { 1 };
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return> LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
| ------------------------------- the found opaque type | ------------------------------- the found opaque type
| |
= note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>) = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:5:10>)
found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
= note: distinct uses of `impl Trait` result in different opaque types = note: distinct uses of `impl Trait` result in different opaque types

View file

@ -1,5 +1,5 @@
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
type FunType = impl Fn<()>; type FunType = impl Fn<()>;
//~^ could not find defining uses //~^ could not find defining uses

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/error-handling-2.rs:6:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/error-handling-2.rs:16:60
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^^^^^^^^
|
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8
--> $DIR/error-handling-2.rs:16:8
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0700`.

View file

@ -1,10 +1,7 @@
// compile-flags:-Zborrowck=mir // compile-flags:-Zborrowck=mir
#![feature(member_constraints)] #![feature(member_constraints)]
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#[derive(Clone)] #[derive(Clone)]
struct CopyIfEq<T, U>(T, U); struct CopyIfEq<T, U>(T, U);

View file

@ -1,11 +1,11 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/error-handling-2.rs:16:60 --> $DIR/error-handling-2.rs:13:60
| |
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^^^^^^^^ | ^^^^^^^^^
| |
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8 note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 13:8
--> $DIR/error-handling-2.rs:16:8 --> $DIR/error-handling-2.rs:13:8
| |
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^ | ^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/error-handling.rs:5:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error: lifetime may not live long enough
--> $DIR/error-handling.rs:25:16
|
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
...
LL | let _: &'b i32 = *u.0;
| ^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
error: aborting due to previous error; 1 warning emitted

View file

@ -1,9 +1,6 @@
// compile-flags:-Zborrowck=mir // compile-flags:-Zborrowck=mir
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#[derive(Clone)] #[derive(Clone)]
struct CopyIfEq<T, U>(T, U); struct CopyIfEq<T, U>(T, U);

View file

@ -1,5 +1,5 @@
error: lifetime may not live long enough error: lifetime may not live long enough
--> $DIR/error-handling.rs:25:16 --> $DIR/error-handling.rs:22:16
| |
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- -- lifetime `'b` defined here | -- -- lifetime `'b` defined here

View file

@ -3,7 +3,7 @@
// revisions: migrate mir // revisions: migrate mir
//[mir]compile-flags: -Z borrowck=mir //[mir]compile-flags: -Z borrowck=mir
#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
trait Trait<'a, 'b> {} trait Trait<'a, 'b> {}
impl<T> Trait<'_, '_> for T {} impl<T> Trait<'_, '_> for T {}

View file

@ -1,23 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/negative-reasoning.rs:5:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/negative-reasoning.rs:22:1
|
LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
| ------------------------------------------- first implementation here
...
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<impl OpaqueTrait>`
|
= note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,9 +1,6 @@
// Tests that we cannot assume that an opaque type does *not* implement some // Tests that we cannot assume that an opaque type does *not* implement some
// other trait // other trait
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
trait OpaqueTrait {} trait OpaqueTrait {}
impl<T> OpaqueTrait for T {} impl<T> OpaqueTrait for T {}

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>` error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/negative-reasoning.rs:22:1 --> $DIR/negative-reasoning.rs:19:1
| |
LL | impl<T: std::fmt::Debug> AnotherTrait for T {} LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
| ------------------------------------------- first implementation here | ------------------------------------------- first implementation here

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-alias-generic-param.rs:8:32
|
LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
warning: 1 warning emitted

View file

@ -3,10 +3,7 @@
// types in 'item' position when generic parameters are involved // types in 'item' position when generic parameters are involved
// //
// run-pass // run-pass
// revisions: min_tait full_tait #![feature(type_alias_impl_trait)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
trait Meow { trait Meow {
type MeowType; type MeowType;
@ -14,7 +11,8 @@ trait Meow {
} }
impl<T, I> Meow for I impl<T, I> Meow for I
where I: Iterator<Item = T> where
I: Iterator<Item = T>,
{ {
type MeowType = impl Iterator<Item = T>; type MeowType = impl Iterator<Item = T>;
fn meow(self) -> Self::MeowType { fn meow(self) -> Self::MeowType {

Some files were not shown because too many files have changed in this diff Show more