]> git.lizzy.rs Git - rust.git/commitdiff
Moved and renamed ui issue tests.
authorAlexander Regueiro <alexreg@me.com>
Mon, 5 Nov 2018 04:00:03 +0000 (04:00 +0000)
committerAlexander Regueiro <alexreg@me.com>
Tue, 6 Nov 2018 01:51:27 +0000 (01:51 +0000)
127 files changed:
src/test/ui/issue-40827.rs [deleted file]
src/test/ui/issue-40827.stderr [deleted file]
src/test/ui/issue-49556.rs [deleted file]
src/test/ui/issue-51602.rs [deleted file]
src/test/ui/issue-51602.stderr [deleted file]
src/test/ui/issue-52717.rs [deleted file]
src/test/ui/issue-52717.stderr [deleted file]
src/test/ui/issue-52992.rs [deleted file]
src/test/ui/issue-53251.rs [deleted file]
src/test/ui/issue-53251.stderr [deleted file]
src/test/ui/issue-53300.rs [deleted file]
src/test/ui/issue-53300.stderr [deleted file]
src/test/ui/issue-53419.rs [deleted file]
src/test/ui/issue-53565.rs [deleted file]
src/test/ui/issue-53565.stderr [deleted file]
src/test/ui/issue-53568.rs [deleted file]
src/test/ui/issue-53692.rs [deleted file]
src/test/ui/issue-53692.stderr [deleted file]
src/test/ui/issue-53840.rs [deleted file]
src/test/ui/issue-53840.stderr [deleted file]
src/test/ui/issue-54302-cases.rs [deleted file]
src/test/ui/issue-54302-cases.stderr [deleted file]
src/test/ui/issue-54302.rs [deleted file]
src/test/ui/issue-54302.stderr [deleted file]
src/test/ui/issues/auxiliary/issue-11680.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-16725.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-1920.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-21202.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-30123-aux.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-41549.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue-5844-aux.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/issue_11680.rs [deleted file]
src/test/ui/issues/auxiliary/issue_16725.rs [deleted file]
src/test/ui/issues/auxiliary/issue_17718_const_privacy.rs [deleted file]
src/test/ui/issues/auxiliary/issue_1920.rs [deleted file]
src/test/ui/issues/auxiliary/issue_21202.rs [deleted file]
src/test/ui/issues/auxiliary/issue_30123_aux.rs [deleted file]
src/test/ui/issues/auxiliary/issue_41549.rs [deleted file]
src/test/ui/issues/auxiliary/issue_5844_aux.rs [deleted file]
src/test/ui/issues/auxiliary/lint-stability.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/lint_stability.rs [deleted file]
src/test/ui/issues/auxiliary/private-trait-xc.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/private_trait_xc.rs [deleted file]
src/test/ui/issues/auxiliary/xcrate-issue-43189-a.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/xcrate-issue-43189-b.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/xcrate-issue-46112-rexport-core.rs [new file with mode: 0644]
src/test/ui/issues/auxiliary/xcrate_issue_43189_a.rs [deleted file]
src/test/ui/issues/auxiliary/xcrate_issue_43189_b.rs [deleted file]
src/test/ui/issues/auxiliary/xcrate_issue_46112_rexport_core.rs [deleted file]
src/test/ui/issues/issue-11593.rs
src/test/ui/issues/issue-11680.rs
src/test/ui/issues/issue-16725.rs
src/test/ui/issues/issue-17718-const-privacy.rs
src/test/ui/issues/issue-1920-1.rs
src/test/ui/issues/issue-1920-2.rs
src/test/ui/issues/issue-1920-3.rs
src/test/ui/issues/issue-21202.rs
src/test/ui/issues/issue-28075.rs
src/test/ui/issues/issue-28388-3.rs
src/test/ui/issues/issue-30123.rs
src/test/ui/issues/issue-32829-2.rs [new file with mode: 0644]
src/test/ui/issues/issue-32829-2.stderr [new file with mode: 0644]
src/test/ui/issues/issue-38875/auxiliary/issue-38875-b.rs [new file with mode: 0644]
src/test/ui/issues/issue-38875/auxiliary/issue_38875_b.rs [deleted file]
src/test/ui/issues/issue-38875/issue-38875.rs [new file with mode: 0644]
src/test/ui/issues/issue-38875/issue_38875.rs [deleted file]
src/test/ui/issues/issue-40827.rs [new file with mode: 0644]
src/test/ui/issues/issue-40827.stderr [new file with mode: 0644]
src/test/ui/issues/issue-41549.rs
src/test/ui/issues/issue-41652/auxiliary/issue-41652-b.rs [new file with mode: 0644]
src/test/ui/issues/issue-41652/auxiliary/issue_41652_b.rs [deleted file]
src/test/ui/issues/issue-41652/issue-41652.rs [new file with mode: 0644]
src/test/ui/issues/issue-41652/issue-41652.stderr [new file with mode: 0644]
src/test/ui/issues/issue-41652/issue_41652.rs [deleted file]
src/test/ui/issues/issue-41652/issue_41652.stderr [deleted file]
src/test/ui/issues/issue-43189.rs
src/test/ui/issues/issue-45829/auxiliary/issue-45829-a.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/auxiliary/issue-45829-b.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs [deleted file]
src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs [deleted file]
src/test/ui/issues/issue-45829/rename-extern-vs-use.rs
src/test/ui/issues/issue-45829/rename-extern-with-tab.rs
src/test/ui/issues/issue-45829/rename-extern.rs
src/test/ui/issues/issue-45829/rename-use-vs-extern.rs
src/test/ui/issues/issue-46112.rs
src/test/ui/issues/issue-49556.rs [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.rs [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.stderr [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.rs [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.stderr [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.rs [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.rs [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.stderr [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.rs [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.stderr [new file with mode: 0644]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.rs [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.stderr [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.rs [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.stderr [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.rs [deleted file]
src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.stderr [deleted file]
src/test/ui/issues/issue-51602.rs [new file with mode: 0644]
src/test/ui/issues/issue-51602.stderr [new file with mode: 0644]
src/test/ui/issues/issue-52717.rs [new file with mode: 0644]
src/test/ui/issues/issue-52717.stderr [new file with mode: 0644]
src/test/ui/issues/issue-52992.rs [new file with mode: 0644]
src/test/ui/issues/issue-53251.rs [new file with mode: 0644]
src/test/ui/issues/issue-53251.stderr [new file with mode: 0644]
src/test/ui/issues/issue-53300.rs [new file with mode: 0644]
src/test/ui/issues/issue-53300.stderr [new file with mode: 0644]
src/test/ui/issues/issue-53419.rs [new file with mode: 0644]
src/test/ui/issues/issue-53565.rs [new file with mode: 0644]
src/test/ui/issues/issue-53565.stderr [new file with mode: 0644]
src/test/ui/issues/issue-53568.rs [new file with mode: 0644]
src/test/ui/issues/issue-53692.rs [new file with mode: 0644]
src/test/ui/issues/issue-53692.stderr [new file with mode: 0644]
src/test/ui/issues/issue-53840.rs [new file with mode: 0644]
src/test/ui/issues/issue-53840.stderr [new file with mode: 0644]
src/test/ui/issues/issue-54302-cases.rs [new file with mode: 0644]
src/test/ui/issues/issue-54302-cases.stderr [new file with mode: 0644]
src/test/ui/issues/issue-54302.rs [new file with mode: 0644]
src/test/ui/issues/issue-54302.stderr [new file with mode: 0644]
src/test/ui/issues/issue-5844.rs
src/test/ui/issues/issue32829.rs [deleted file]
src/test/ui/issues/issue32829.stderr [deleted file]

diff --git a/src/test/ui/issue-40827.rs b/src/test/ui/issue-40827.rs
deleted file mode 100644 (file)
index 4b079ac..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::rc::Rc;
-use std::sync::Arc;
-
-struct Foo(Arc<Bar>);
-
-enum Bar {
-    A(Rc<Foo>),
-    B(Option<Foo>),
-}
-
-fn f<T: Send>(_: T) {}
-
-fn main() {
-    f(Foo(Arc::new(Bar::B(None))));
-    //~^ ERROR E0277
-    //~| ERROR E0277
-}
diff --git a/src/test/ui/issue-40827.stderr b/src/test/ui/issue-40827.stderr
deleted file mode 100644 (file)
index dd0ebf9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
-  --> $DIR/issue-40827.rs:24:5
-   |
-LL |     f(Foo(Arc::new(Bar::B(None))));
-   |     ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
-   |
-   = help: within `Bar`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<Foo>`
-   = note: required because it appears within the type `Bar`
-   = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
-   = note: required because it appears within the type `Foo`
-note: required by `f`
-  --> $DIR/issue-40827.rs:21:1
-   |
-LL | fn f<T: Send>(_: T) {}
-   | ^^^^^^^^^^^^^^^^^^^
-
-error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
-  --> $DIR/issue-40827.rs:24:5
-   |
-LL |     f(Foo(Arc::new(Bar::B(None))));
-   |     ^ `std::rc::Rc<Foo>` cannot be shared between threads safely
-   |
-   = help: within `Bar`, the trait `std::marker::Sync` is not implemented for `std::rc::Rc<Foo>`
-   = note: required because it appears within the type `Bar`
-   = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
-   = note: required because it appears within the type `Foo`
-note: required by `f`
-  --> $DIR/issue-40827.rs:21:1
-   |
-LL | fn f<T: Send>(_: T) {}
-   | ^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/issue-49556.rs b/src/test/ui/issue-49556.rs
deleted file mode 100644 (file)
index 7f7b349..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-pass
-fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
-    data.iter()
-        .map(
-            |x| x // fn(&'a usize) -> &'(ReScope) usize
-        )
-        .map(
-            |x| *x // fn(&'(ReScope) usize) -> usize
-        )
-}
-
-fn main() {
-}
diff --git a/src/test/ui/issue-51602.rs b/src/test/ui/issue-51602.rs
deleted file mode 100644 (file)
index a3edecb..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main(){
-    if i in 1..10 {
-        break;
-    }
-}
diff --git a/src/test/ui/issue-51602.stderr b/src/test/ui/issue-51602.stderr
deleted file mode 100644 (file)
index d50ee64..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-error: expected `{`, found keyword `in`
-  --> $DIR/issue-51602.rs:12:10
-   |
-LL |     if i in 1..10 {
-   |     --   ^^ expected `{`
-   |     |
-   |     this `if` statement has a condition, but no block
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/issue-52717.rs b/src/test/ui/issue-52717.rs
deleted file mode 100644 (file)
index d40e2bd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-enum A {
-  A {
-    foo: usize,
-  }
-}
-
-fn main() {
-  let x = A::A { foo: 3 };
-  match x {
-    A::A { fob } => { println!("{}", fob); }
-  }
-}
diff --git a/src/test/ui/issue-52717.stderr b/src/test/ui/issue-52717.stderr
deleted file mode 100644 (file)
index 0ef5a84..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0026]: variant `A::A` does not have a field named `fob`
-  --> $DIR/issue-52717.rs:19:12
-   |
-LL |     A::A { fob } => { println!("{}", fob); }
-   |            ^^^
-   |            |
-   |            variant `A::A` does not have this field
-   |            help: did you mean: `foo`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0026`.
diff --git a/src/test/ui/issue-52992.rs b/src/test/ui/issue-52992.rs
deleted file mode 100644 (file)
index 2ece0ee..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Regression test for an NLL-related ICE (#52992) -- computing
-// implied bounds was causing outlives relations that were not
-// properly handled.
-//
-// compile-pass
-
-#![feature(nll)]
-
-fn main() {}
-
-fn fail<'a>() -> Struct<'a, Generic<()>> {
-    Struct(&Generic(()))
-}
-
-struct Struct<'a, T>(&'a T) where
-    T: Trait + 'a,
-    T::AT: 'a; // only fails with this bound
-
-struct Generic<T>(T);
-
-trait Trait {
-    type AT;
-}
-
-impl<T> Trait for Generic<T> {
-    type AT = T; // only fails with a generic AT
-}
diff --git a/src/test/ui/issue-53251.rs b/src/test/ui/issue-53251.rs
deleted file mode 100644 (file)
index 8c75ea4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct S;
-
-impl S {
-    fn f() {}
-}
-
-macro_rules! impl_add {
-    ($($n:ident)*) => {
-        $(
-            fn $n() {
-                S::f::<i64>();
-                //~^ ERROR wrong number of type arguments
-            }
-        )*
-    }
-}
-
-impl_add!(a b);
-
-fn main() {}
diff --git a/src/test/ui/issue-53251.stderr b/src/test/ui/issue-53251.stderr
deleted file mode 100644 (file)
index 51ea745..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0107]: wrong number of type arguments: expected 0, found 1
-  --> $DIR/issue-53251.rs:21:24
-   |
-LL |                 S::f::<i64>();
-   |                        ^^^ unexpected type argument
-...
-LL | impl_add!(a b);
-   | --------------- in this macro invocation
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/issue-53300.rs b/src/test/ui/issue-53300.rs
deleted file mode 100644 (file)
index d055a6f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// issue 53300
-
-pub trait A {
-    fn add(&self, b: i32) -> i32;
-}
-
-fn addition() -> Wrapper<impl A> {}
-//~^ ERROR cannot find type `Wrapper` in this scope [E0412]
-
-fn main() {
-    let res = addition();
-}
diff --git a/src/test/ui/issue-53300.stderr b/src/test/ui/issue-53300.stderr
deleted file mode 100644 (file)
index 920287a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0412]: cannot find type `Wrapper` in this scope
-  --> $DIR/issue-53300.rs:17:18
-   |
-LL | fn addition() -> Wrapper<impl A> {}
-   |                  ^^^^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/issue-53419.rs b/src/test/ui/issue-53419.rs
deleted file mode 100644 (file)
index 0dd5a85..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//compile-pass
-
-struct Foo {
-    bar: for<'r> Fn(usize, &'r FnMut())
-}
-
-fn main() {
-}
-
diff --git a/src/test/ui/issue-53565.rs b/src/test/ui/issue-53565.rs
deleted file mode 100644 (file)
index 2bf3829..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-use std::time::{foo, bar, buzz};
-use std::time::{abc, def};
-fn main(){
-   println!("Hello World!");
-}
diff --git a/src/test/ui/issue-53565.stderr b/src/test/ui/issue-53565.stderr
deleted file mode 100644 (file)
index 945f5ef..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0432]: unresolved imports `std::time::foo`, `std::time::bar`, `std::time::buzz`
-  --> $DIR/issue-53565.rs:10:17
-   |
-LL | use std::time::{foo, bar, buzz};
-   |                 ^^^  ^^^  ^^^^ no `buzz` in `time`
-   |                 |    |
-   |                 |    no `bar` in `time`
-   |                 no `foo` in `time`
-
-error[E0432]: unresolved imports `std::time::abc`, `std::time::def`
-  --> $DIR/issue-53565.rs:11:17
-   |
-LL | use std::time::{abc, def};
-   |                 ^^^  ^^^ no `def` in `time`
-   |                 |
-   |                 no `abc` in `time`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/ui/issue-53568.rs b/src/test/ui/issue-53568.rs
deleted file mode 100644 (file)
index 6b479f7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Regression test for an NLL-related ICE (#53568) -- we failed to
-// resolve inference variables in "custom type-ops".
-//
-// compile-pass
-
-#![feature(nll)]
-#![allow(dead_code)]
-
-trait Future {
-    type Item;
-}
-
-impl<F, T> Future for F
-where F: Fn() -> T
-{
-    type Item = T;
-}
-
-trait Connect {}
-
-struct Connector<H> {
-    handler: H,
-}
-
-impl<H, T> Connect for Connector<H>
-where
-    T: 'static,
-    H: Future<Item = T>
-{
-}
-
-struct Client<C> {
-    connector: C,
-}
-
-fn build<C>(_connector: C) -> Client<C> {
-    unimplemented!()
-}
-
-fn client<H>(handler: H) -> Client<impl Connect>
-where H: Fn() + Copy
-{
-    let connector = Connector {
-        handler,
-    };
-    let client = build(connector);
-    client
-}
-
-fn main() { }
-
diff --git a/src/test/ui/issue-53692.rs b/src/test/ui/issue-53692.rs
deleted file mode 100644 (file)
index 0b6cc36..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-fn main() {
-        let items = vec![1, 2, 3];
-        let ref_items: &[i32] = &items;
-        let items_clone: Vec<i32> = ref_items.clone();
-
-        // in that case no suggestion will be triggered
-        let items_clone_2:Vec<i32> = items.clone();
-
-        let s = "hi";
-        let string: String = s.clone();
-
-        // in that case no suggestion will be triggered
-        let s2 = "hi";
-        let string_2: String = s2.to_string();
-}
diff --git a/src/test/ui/issue-53692.stderr b/src/test/ui/issue-53692.stderr
deleted file mode 100644 (file)
index 9cd8a53..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-53692.rs:13:37
-   |
-LL |         let items_clone: Vec<i32> = ref_items.clone();
-   |                                     ^^^^^^^^^^^^^^^^^
-   |                                     |
-   |                                     expected struct `std::vec::Vec`, found &[i32]
-   |                                     help: try using a conversion method: `ref_items.to_vec()`
-   |
-   = note: expected type `std::vec::Vec<i32>`
-              found type `&[i32]`
-
-error[E0308]: mismatched types
-  --> $DIR/issue-53692.rs:19:30
-   |
-LL |         let string: String = s.clone();
-   |                              ^^^^^^^^^
-   |                              |
-   |                              expected struct `std::string::String`, found &str
-   |                              help: try using a conversion method: `s.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&str`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issue-53840.rs b/src/test/ui/issue-53840.rs
deleted file mode 100644 (file)
index ece3caf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-enum E {
-    Foo(String, String, String),
-}
-
-struct Bar {
-    a: String,
-    b: String,
-}
-
-fn main() {
-    let bar = Bar { a: "1".to_string(), b: "2".to_string() };
-    match E::Foo("".into(), "".into(), "".into()) {
-        E::Foo(a, b, ref c) => {}
-    }
-    match bar {
-        Bar {a, ref b} => {}
-    }
-}
diff --git a/src/test/ui/issue-53840.stderr b/src/test/ui/issue-53840.stderr
deleted file mode 100644 (file)
index 961e4c0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0009]: cannot bind by-move and by-ref in the same pattern
-  --> $DIR/issue-53840.rs:22:16
-   |
-LL |         E::Foo(a, b, ref c) => {}
-   |                ^  ^  ----- both by-ref and by-move used
-   |                |  |
-   |                |  by-move pattern here
-   |                by-move pattern here
-
-error[E0009]: cannot bind by-move and by-ref in the same pattern
-  --> $DIR/issue-53840.rs:25:14
-   |
-LL |         Bar {a, ref b} => {}
-   |              ^  ----- both by-ref and by-move used
-   |              |
-   |              by-move pattern here
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0009`.
diff --git a/src/test/ui/issue-54302-cases.rs b/src/test/ui/issue-54302-cases.rs
deleted file mode 100644 (file)
index 6d1c61c..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Mirror {
-    type Image;
-    fn coerce(self) -> Self::Image;
-}
-
-impl<T> Mirror for T {
-    type Image = T;
-    fn coerce(self) -> Self { self }
-}
-
-trait Foo<'x, T> {
-    fn foo(self) -> &'x T;
-}
-
-impl<'s, 'x, T: 'x> Foo<'x, T> for &'s T where &'s T: Foo2<'x, T> {
-    fn foo(self) -> &'x T { self.foo2() }
-}
-
-trait Foo2<'x, T> {
-    fn foo2(self) -> &'x T;
-}
-
-// example 1 - fails leak check
-impl<'x> Foo2<'x, u32> for &'x u32
-{
-    fn foo2(self) -> &'x u32 { self }
-}
-
-// example 2 - OK with this issue
-impl<'x, 'a: 'x> Foo2<'x, i32> for &'a i32
-{
-    fn foo2(self) -> &'x i32 { self }
-}
-
-// example 3 - fails due to issue #XYZ + Leak-check
-impl<'x, T> Foo2<'x, u64> for T
-    where T: Mirror<Image=&'x u64>
-{
-    fn foo2(self) -> &'x u64 { self.coerce() }
-}
-
-// example 4 - fails due to issue #XYZ
-impl<'x, 'a: 'x, T> Foo2<'x, i64> for T
-    where T: Mirror<Image=&'a i64>
-{
-    fn foo2(self) -> &'x i64 { self.coerce() }
-}
-
-
-trait RefFoo<T> {
-    fn ref_foo(&self) -> &'static T;
-}
-
-impl<T> RefFoo<T> for T where for<'a> &'a T: Foo<'static, T> {
-    fn ref_foo(&self) -> &'static T {
-        self.foo()
-    }
-}
-
-
-fn coerce_lifetime1(a: &u32) -> &'static u32
-{
-    <u32 as RefFoo<u32>>::ref_foo(a)
-    //~^ ERROR the trait bound `for<'a> &'a u32: Foo2<'_, u32>` is not satisfied
-}
-
-fn coerce_lifetime2(a: &i32) -> &'static i32
-{
-    <i32 as RefFoo<i32>>::ref_foo(a)
-    //~^ ERROR the requirement `for<'a> 'a : ` is not satisfied
-}
-
-fn coerce_lifetime3(a: &u64) -> &'static u64
-{
-    <u64 as RefFoo<u64>>::ref_foo(a)
-    //~^ ERROR type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`
-}
-
-fn coerce_lifetime4(a: &i64) -> &'static i64
-{
-    <i64 as RefFoo<i64>>::ref_foo(a)
-    //~^ ERROR type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`
-}
-
-fn main() {}
diff --git a/src/test/ui/issue-54302-cases.stderr b/src/test/ui/issue-54302-cases.stderr
deleted file mode 100644 (file)
index 9603f7a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-error[E0277]: the trait bound `for<'a> &'a u32: Foo2<'_, u32>` is not satisfied
-  --> $DIR/issue-54302-cases.rs:73:5
-   |
-LL |     <u32 as RefFoo<u32>>::ref_foo(a)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo2<'_, u32>` is not implemented for `&'a u32`
-   |
-   = help: the following implementations were found:
-             <&'x u32 as Foo2<'x, u32>>
-   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u32>` for `&'a u32`
-   = note: required because of the requirements on the impl of `RefFoo<u32>` for `u32`
-note: required by `RefFoo::ref_foo`
-  --> $DIR/issue-54302-cases.rs:61:5
-   |
-LL |     fn ref_foo(&self) -> &'static T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0279]: the requirement `for<'a> 'a : ` is not satisfied (`expected bound lifetime parameter 'a, found concrete lifetime`)
-  --> $DIR/issue-54302-cases.rs:79:5
-   |
-LL |     <i32 as RefFoo<i32>>::ref_foo(a)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, i32>` for `&'a i32`
-   = note: required because of the requirements on the impl of `for<'a> Foo<'static, i32>` for `&'a i32`
-   = note: required because of the requirements on the impl of `RefFoo<i32>` for `i32`
-note: required by `RefFoo::ref_foo`
-  --> $DIR/issue-54302-cases.rs:61:5
-   |
-LL |     fn ref_foo(&self) -> &'static T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0271]: type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`
-  --> $DIR/issue-54302-cases.rs:85:5
-   |
-LL |     <u64 as RefFoo<u64>>::ref_foo(a)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime
-   |
-   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, u64>` for `&'a u64`
-   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u64>` for `&'a u64`
-   = note: required because of the requirements on the impl of `RefFoo<u64>` for `u64`
-note: required by `RefFoo::ref_foo`
-  --> $DIR/issue-54302-cases.rs:61:5
-   |
-LL |     fn ref_foo(&self) -> &'static T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0271]: type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`
-  --> $DIR/issue-54302-cases.rs:91:5
-   |
-LL |     <i64 as RefFoo<i64>>::ref_foo(a)
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime
-   |
-   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, i64>` for `&'a i64`
-   = note: required because of the requirements on the impl of `for<'a> Foo<'static, i64>` for `&'a i64`
-   = note: required because of the requirements on the impl of `RefFoo<i64>` for `i64`
-note: required by `RefFoo::ref_foo`
-  --> $DIR/issue-54302-cases.rs:61:5
-   |
-LL |     fn ref_foo(&self) -> &'static T;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
-Some errors occurred: E0271, E0277, E0279.
-For more information about an error, try `rustc --explain E0271`.
diff --git a/src/test/ui/issue-54302.rs b/src/test/ui/issue-54302.rs
deleted file mode 100644 (file)
index 969d19c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Deserialize<'de> {}
-
-trait DeserializeOwned: for<'de> Deserialize<'de> {}
-impl<T> DeserializeOwned for T where T: for<'de> Deserialize<'de> {}
-
-// Based on this impl, `&'static str` only implements Deserialize<'static>.
-// It does not implement for<'de> Deserialize<'de>.
-impl<'de: 'a, 'a> Deserialize<'de> for &'a str {}
-
-fn main() {
-    // Then why does it implement DeserializeOwned? This compiles.
-    fn assert_deserialize_owned<T: DeserializeOwned>() {}
-    assert_deserialize_owned::<&'static str>();
-    //~^ ERROR the requirement `for<'de> 'de : ` is not satisfied
-
-    // It correctly does not implement for<'de> Deserialize<'de>.
-    //fn assert_hrtb<T: for<'de> Deserialize<'de>>() {}
-    //assert_hrtb::<&'static str>();
-}
diff --git a/src/test/ui/issue-54302.stderr b/src/test/ui/issue-54302.stderr
deleted file mode 100644 (file)
index f122dae..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0279]: the requirement `for<'de> 'de : ` is not satisfied (`expected bound lifetime parameter 'de, found concrete lifetime`)
-  --> $DIR/issue-54302.rs:23:5
-   |
-LL |     assert_deserialize_owned::<&'static str>();
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: required because of the requirements on the impl of `for<'de> Deserialize<'de>` for `&'static str`
-   = note: required because of the requirements on the impl of `DeserializeOwned` for `&'static str`
-note: required by `main::assert_deserialize_owned`
-  --> $DIR/issue-54302.rs:22:5
-   |
-LL |     fn assert_deserialize_owned<T: DeserializeOwned>() {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0279`.
diff --git a/src/test/ui/issues/auxiliary/issue-11680.rs b/src/test/ui/issues/auxiliary/issue-11680.rs
new file mode 100644 (file)
index 0000000..18f7875
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Foo {
+    Bar(isize)
+}
+
+pub mod test {
+    enum Foo {
+        Bar(isize)
+    }
+}
diff --git a/src/test/ui/issues/auxiliary/issue-16725.rs b/src/test/ui/issues/auxiliary/issue-16725.rs
new file mode 100644 (file)
index 0000000..b3b04b4
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern {
+    fn bar();
+}
diff --git a/src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs b/src/test/ui/issues/auxiliary/issue-17718-const-privacy.rs
new file mode 100644 (file)
index 0000000..3901d73
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use foo::FOO2;
+
+pub const FOO: usize = 3;
+const BAR: usize = 3;
+
+mod foo {
+    pub const FOO2: usize = 3;
+}
diff --git a/src/test/ui/issues/auxiliary/issue-1920.rs b/src/test/ui/issues/auxiliary/issue-1920.rs
new file mode 100644 (file)
index 0000000..5506517
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Just exporting some type to test for correct diagnostics when this
+// crate is pulled in at a non-root location in client crate.
+
+pub struct S;
diff --git a/src/test/ui/issues/auxiliary/issue-21202.rs b/src/test/ui/issues/auxiliary/issue-21202.rs
new file mode 100644 (file)
index 0000000..afdbf78
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod A {
+    pub struct Foo;
+    impl Foo {
+        fn foo(&self) { }
+    }
+}
diff --git a/src/test/ui/issues/auxiliary/issue-30123-aux.rs b/src/test/ui/issues/auxiliary/issue-30123-aux.rs
new file mode 100644 (file)
index 0000000..f60311a
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::marker::PhantomData;
+
+pub struct Directed;
+pub struct Undirected;
+
+pub struct Graph<N, E, Ty = Directed> {
+    nodes: Vec<PhantomData<N>>,
+    edges: Vec<PhantomData<E>>,
+    ty: PhantomData<Ty>,
+}
+
+
+impl<N, E> Graph<N, E, Directed> {
+    pub fn new() -> Self {
+        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
+    }
+}
+
+impl<N, E> Graph<N, E, Undirected> {
+    pub fn new_undirected() -> Self {
+        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
+    }
+}
diff --git a/src/test/ui/issues/auxiliary/issue-41549.rs b/src/test/ui/issues/auxiliary/issue-41549.rs
new file mode 100644 (file)
index 0000000..5a6db78
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub trait Trait {
+    const CONST: u32;
+}
diff --git a/src/test/ui/issues/auxiliary/issue-5844-aux.rs b/src/test/ui/issues/auxiliary/issue-5844-aux.rs
new file mode 100644 (file)
index 0000000..7fa937e
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern "C" {
+    pub fn rand() -> u32;
+}
diff --git a/src/test/ui/issues/auxiliary/issue_11680.rs b/src/test/ui/issues/auxiliary/issue_11680.rs
deleted file mode 100644 (file)
index 18f7875..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Foo {
-    Bar(isize)
-}
-
-pub mod test {
-    enum Foo {
-        Bar(isize)
-    }
-}
diff --git a/src/test/ui/issues/auxiliary/issue_16725.rs b/src/test/ui/issues/auxiliary/issue_16725.rs
deleted file mode 100644 (file)
index b3b04b4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern {
-    fn bar();
-}
diff --git a/src/test/ui/issues/auxiliary/issue_17718_const_privacy.rs b/src/test/ui/issues/auxiliary/issue_17718_const_privacy.rs
deleted file mode 100644 (file)
index 3901d73..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use foo::FOO2;
-
-pub const FOO: usize = 3;
-const BAR: usize = 3;
-
-mod foo {
-    pub const FOO2: usize = 3;
-}
diff --git a/src/test/ui/issues/auxiliary/issue_1920.rs b/src/test/ui/issues/auxiliary/issue_1920.rs
deleted file mode 100644 (file)
index 5506517..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Just exporting some type to test for correct diagnostics when this
-// crate is pulled in at a non-root location in client crate.
-
-pub struct S;
diff --git a/src/test/ui/issues/auxiliary/issue_21202.rs b/src/test/ui/issues/auxiliary/issue_21202.rs
deleted file mode 100644 (file)
index afdbf78..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod A {
-    pub struct Foo;
-    impl Foo {
-        fn foo(&self) { }
-    }
-}
diff --git a/src/test/ui/issues/auxiliary/issue_30123_aux.rs b/src/test/ui/issues/auxiliary/issue_30123_aux.rs
deleted file mode 100644 (file)
index f60311a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::marker::PhantomData;
-
-pub struct Directed;
-pub struct Undirected;
-
-pub struct Graph<N, E, Ty = Directed> {
-    nodes: Vec<PhantomData<N>>,
-    edges: Vec<PhantomData<E>>,
-    ty: PhantomData<Ty>,
-}
-
-
-impl<N, E> Graph<N, E, Directed> {
-    pub fn new() -> Self {
-        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
-    }
-}
-
-impl<N, E> Graph<N, E, Undirected> {
-    pub fn new_undirected() -> Self {
-        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
-    }
-}
diff --git a/src/test/ui/issues/auxiliary/issue_41549.rs b/src/test/ui/issues/auxiliary/issue_41549.rs
deleted file mode 100644 (file)
index 5a6db78..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub trait Trait {
-    const CONST: u32;
-}
diff --git a/src/test/ui/issues/auxiliary/issue_5844_aux.rs b/src/test/ui/issues/auxiliary/issue_5844_aux.rs
deleted file mode 100644 (file)
index 7fa937e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern "C" {
-    pub fn rand() -> u32;
-}
diff --git a/src/test/ui/issues/auxiliary/lint-stability.rs b/src/test/ui/issues/auxiliary/lint-stability.rs
new file mode 100644 (file)
index 0000000..5547458
--- /dev/null
@@ -0,0 +1,198 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="lint_stability"]
+#![crate_type = "lib"]
+#![feature(staged_api)]
+#![feature(associated_type_defaults)]
+#![stable(feature = "lint_stability", since = "1.0.0")]
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated() {}
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_text() {}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "99.99.99", reason = "text")]
+pub fn deprecated_future() {}
+
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_unstable() {}
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_unstable_text() {}
+
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub fn unstable() {}
+#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
+pub fn unstable_text() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub fn stable() {}
+#[stable(feature = "rust1", since = "1.0.0")]
+pub fn stable_text() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct MethodTester;
+
+impl MethodTester {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated(&self) {}
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_text(&self) {}
+
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_unstable(&self) {}
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_unstable_text(&self) {}
+
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    pub fn method_unstable(&self) {}
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
+    pub fn method_unstable_text(&self) {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn method_stable(&self) {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn method_stable_text(&self) {}
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+pub trait Trait {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated(&self) {}
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_text(&self) {}
+
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_unstable(&self) {}
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_unstable_text(&self) {}
+
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    fn trait_unstable(&self) {}
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
+    fn trait_unstable_text(&self) {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    fn trait_stable(&self) {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    fn trait_stable_text(&self) {}
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+pub trait TraitWithAssociatedTypes {
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    type TypeUnstable = u8;
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    type TypeDeprecated = u8;
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+impl Trait for MethodTester {}
+
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub trait UnstableTrait { fn dummy(&self) { } }
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub trait DeprecatedTrait {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedStruct {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
+}
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableStruct {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
+}
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub struct UnstableStruct {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
+}
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableStruct {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
+}
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub enum UnstableEnum {}
+#[stable(feature = "rust1", since = "1.0.0")]
+pub enum StableEnum {}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnitStruct;
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableUnitStruct;
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub struct UnstableUnitStruct;
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableUnitStruct;
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+pub enum Enum {
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    DeprecatedVariant,
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    DeprecatedUnstableVariant,
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
+    UnstableVariant,
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    StableVariant,
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[unstable(feature = "unstable_test_feature", issue = "0")]
+pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test {
+    () => (deprecated());
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test_arg {
+    ($func:expr) => ($func);
+}
+
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test_arg_nested {
+    ($func:ident) => (macro_test_arg!($func()));
+}
diff --git a/src/test/ui/issues/auxiliary/lint_stability.rs b/src/test/ui/issues/auxiliary/lint_stability.rs
deleted file mode 100644 (file)
index 5547458..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="lint_stability"]
-#![crate_type = "lib"]
-#![feature(staged_api)]
-#![feature(associated_type_defaults)]
-#![stable(feature = "lint_stability", since = "1.0.0")]
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated() {}
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_text() {}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "99.99.99", reason = "text")]
-pub fn deprecated_future() {}
-
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_unstable() {}
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_unstable_text() {}
-
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub fn unstable() {}
-#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
-pub fn unstable_text() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub fn stable() {}
-#[stable(feature = "rust1", since = "1.0.0")]
-pub fn stable_text() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct MethodTester;
-
-impl MethodTester {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated(&self) {}
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_text(&self) {}
-
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_unstable(&self) {}
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_unstable_text(&self) {}
-
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    pub fn method_unstable(&self) {}
-    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
-    pub fn method_unstable_text(&self) {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn method_stable(&self) {}
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn method_stable_text(&self) {}
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-pub trait Trait {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated(&self) {}
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_text(&self) {}
-
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_unstable(&self) {}
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_unstable_text(&self) {}
-
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    fn trait_unstable(&self) {}
-    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
-    fn trait_unstable_text(&self) {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn trait_stable(&self) {}
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn trait_stable_text(&self) {}
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-pub trait TraitWithAssociatedTypes {
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    type TypeUnstable = u8;
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    type TypeDeprecated = u8;
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-impl Trait for MethodTester {}
-
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub trait UnstableTrait { fn dummy(&self) { } }
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub trait DeprecatedTrait {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedStruct {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
-}
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableStruct {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
-}
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub struct UnstableStruct {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
-}
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableStruct {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
-}
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub enum UnstableEnum {}
-#[stable(feature = "rust1", since = "1.0.0")]
-pub enum StableEnum {}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnitStruct;
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableUnitStruct;
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub struct UnstableUnitStruct;
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableUnitStruct;
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-pub enum Enum {
-    #[stable(feature = "stable_test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    DeprecatedVariant,
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    DeprecatedUnstableVariant,
-    #[unstable(feature = "unstable_test_feature", issue = "0")]
-    UnstableVariant,
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    StableVariant,
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "unstable_test_feature", issue = "0")]
-pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test {
-    () => (deprecated());
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test_arg {
-    ($func:expr) => ($func);
-}
-
-#[stable(feature = "stable_test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test_arg_nested {
-    ($func:ident) => (macro_test_arg!($func()));
-}
diff --git a/src/test/ui/issues/auxiliary/private-trait-xc.rs b/src/test/ui/issues/auxiliary/private-trait-xc.rs
new file mode 100644 (file)
index 0000000..37ee10c
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {}
diff --git a/src/test/ui/issues/auxiliary/private_trait_xc.rs b/src/test/ui/issues/auxiliary/private_trait_xc.rs
deleted file mode 100644 (file)
index 37ee10c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {}
diff --git a/src/test/ui/issues/auxiliary/xcrate-issue-43189-a.rs b/src/test/ui/issues/auxiliary/xcrate-issue-43189-a.rs
new file mode 100644 (file)
index 0000000..95b2d62
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+
+pub trait A {
+    fn a(&self) {}
+}
+impl A for () {}
diff --git a/src/test/ui/issues/auxiliary/xcrate-issue-43189-b.rs b/src/test/ui/issues/auxiliary/xcrate-issue-43189-b.rs
new file mode 100644 (file)
index 0000000..a396c31
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub extern crate xcrate_issue_43189_a;
diff --git a/src/test/ui/issues/auxiliary/xcrate-issue-46112-rexport-core.rs b/src/test/ui/issues/auxiliary/xcrate-issue-46112-rexport-core.rs
new file mode 100644 (file)
index 0000000..80f877f
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub extern crate core;
diff --git a/src/test/ui/issues/auxiliary/xcrate_issue_43189_a.rs b/src/test/ui/issues/auxiliary/xcrate_issue_43189_a.rs
deleted file mode 100644 (file)
index 95b2d62..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-
-pub trait A {
-    fn a(&self) {}
-}
-impl A for () {}
diff --git a/src/test/ui/issues/auxiliary/xcrate_issue_43189_b.rs b/src/test/ui/issues/auxiliary/xcrate_issue_43189_b.rs
deleted file mode 100644 (file)
index a396c31..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub extern crate xcrate_issue_43189_a;
diff --git a/src/test/ui/issues/auxiliary/xcrate_issue_46112_rexport_core.rs b/src/test/ui/issues/auxiliary/xcrate_issue_46112_rexport_core.rs
deleted file mode 100644 (file)
index 80f877f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub extern crate core;
index 2749438433d16fd150e063a693c7a5cb408e3a48..f962704dc75a5755d00bc004275f1e92b67fe230 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:private_trait_xc.rs
+// aux-build:private-trait-xc.rs
 
 extern crate private_trait_xc;
 
index 7dccd7811066e3843393d6354f16dc8adc5620f0..209b63104fa02876154b05c34f8a46bf5a156335 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_11680.rs
+// aux-build:issue-11680.rs
 
 extern crate issue_11680 as other;
 
index cadf602a4cfc4aa962c34d062c130b721c7c7610..659ffb2c98408a9c950a6030c0117f6a59b7bc60 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_16725.rs
+// aux-build:issue-16725.rs
 
 extern crate issue_16725 as foo;
 
index 523a387956a32e7e93b4f6175e588c6ce0d14b08..60eb4b7126dae753768edfb9361b9bc5c6fcd35e 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_17718_const_privacy.rs
+// aux-build:issue-17718-const-privacy.rs
 
 extern crate issue_17718_const_privacy as other;
 
index 97dd290a45bc83f7d961f61c67e99c5d63e23e45..7ba655805829aa59857066c5e0b727ac98689eef 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Test that absolute path names are correct when a crate is not linked into the root namespace
 
-// aux-build:issue_1920.rs
+// aux-build:issue-1920.rs
 
 mod foo {
     pub extern crate issue_1920;
index 2af6e2cc991faa98447b0619dbeb99d1f5db8a76..bf4817aaf34dc067c22ffac27172e3757a1b6a12 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Test that when a crate is linked under another name that name is used in global paths
 
-// aux-build:issue_1920.rs
+// aux-build:issue-1920.rs
 
 extern crate issue_1920 as bar;
 
index fa6efea845fce2e80df9823e0cee75c7b8d22adf..a70e958630f28e1bcfe7d69363049efe5f4e2ae0 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Test that when a crate is linked multiple times that the shortest absolute path name is used
 
-// aux-build:issue_1920.rs
+// aux-build:issue-1920.rs
 
 mod foo {
     pub extern crate issue_1920;
index 2bce838c1cfdc926bc32f1643b67666322a16a71..fa4b515c81c00c5f3e89c5a0e1fa45c6d7abbb00 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_21202.rs
+// aux-build:issue-21202.rs
 
 extern crate issue_21202 as crate1;
 
index 0f6b9d1b5dc4fc5a6c6a893b440090b02b267f57..494b446dd3ff2cb4a97188b1c4bb31a66dae3fd1 100644 (file)
@@ -10,7 +10,7 @@
 
 // Unstable entities should be caught in import lists
 
-// aux-build:lint_stability.rs
+// aux-build:lint-stability.rs
 
 #![allow(warnings)]
 
index 12e3457ef9e34c0b5817a34a7ee98dccd0178710..7593bb35add097969de0bbe89e6996be611b9df7 100644 (file)
@@ -10,7 +10,7 @@
 
 // Prefix in imports with empty braces should be resolved and checked privacy, stability, etc.
 
-// aux-build:lint_stability.rs
+// aux-build:lint-stability.rs
 
 extern crate lint_stability;
 
index 653097ad69f726bdf297fb07040b2197c5f1ba67..39278cffa122a431e962273afa2ba091be29ad2a 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_30123_aux.rs
+// aux-build:issue-30123-aux.rs
 
 extern crate issue_30123_aux;
 use issue_30123_aux::*;
diff --git a/src/test/ui/issues/issue-32829-2.rs b/src/test/ui/issues/issue-32829-2.rs
new file mode 100644 (file)
index 0000000..2b223ba
--- /dev/null
@@ -0,0 +1,94 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ignore-tidy-linelength
+
+#![feature(const_fn)]
+
+const bad : u32 = {
+    {
+        5;
+        //~^ ERROR statements in constants are unstable
+        0
+    }
+};
+
+const bad_two : u32 = {
+    {
+        invalid();
+        //~^ ERROR statements in constants are unstable
+        //~^^ ERROR: calls in constants are limited to constant functions, tuple structs and tuple variants
+        0
+    }
+};
+
+const bad_three : u32 = {
+    {
+        valid();
+        //~^ ERROR statements in constants are unstable
+        0
+    }
+};
+
+static bad_four : u32 = {
+    {
+        5;
+        //~^ ERROR statements in statics are unstable
+        0
+    }
+};
+
+static bad_five : u32 = {
+    {
+        invalid();
+        //~^ ERROR: calls in statics are limited to constant functions, tuple structs and tuple variants
+        //~| ERROR statements in statics are unstable
+        0
+    }
+};
+
+static bad_six : u32 = {
+    {
+        valid();
+        //~^ ERROR statements in statics are unstable
+        0
+    }
+};
+
+static mut bad_seven : u32 = {
+    {
+        5;
+        //~^ ERROR statements in statics are unstable
+        0
+    }
+};
+
+static mut bad_eight : u32 = {
+    {
+        invalid();
+        //~^ ERROR statements in statics are unstable
+        //~| ERROR: calls in statics are limited to constant functions, tuple structs and tuple variants
+        0
+    }
+};
+
+static mut bad_nine : u32 = {
+    {
+        valid();
+        //~^ ERROR statements in statics are unstable
+        0
+    }
+};
+
+
+fn invalid() {}
+const fn valid() {}
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-32829-2.stderr b/src/test/ui/issues/issue-32829-2.stderr
new file mode 100644 (file)
index 0000000..6d6b94c
--- /dev/null
@@ -0,0 +1,94 @@
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:17:9
+   |
+LL |         5;
+   |         ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-32829-2.rs:25:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:25:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in constants are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:34:9
+   |
+LL |         valid();
+   |         ^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:42:9
+   |
+LL |         5;
+   |         ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-32829-2.rs:50:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:50:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:59:9
+   |
+LL |         valid();
+   |         ^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:67:9
+   |
+LL |         5;
+   |         ^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
+  --> $DIR/issue-32829-2.rs:75:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:75:9
+   |
+LL |         invalid();
+   |         ^^^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error[E0658]: statements in statics are unstable (see issue #48821)
+  --> $DIR/issue-32829-2.rs:84:9
+   |
+LL |         valid();
+   |         ^^^^^^^
+   |
+   = help: add #![feature(const_let)] to the crate attributes to enable
+
+error: aborting due to 12 previous errors
+
+Some errors occurred: E0015, E0658.
+For more information about an error, try `rustc --explain E0015`.
diff --git a/src/test/ui/issues/issue-38875/auxiliary/issue-38875-b.rs b/src/test/ui/issues/issue-38875/auxiliary/issue-38875-b.rs
new file mode 100644 (file)
index 0000000..dd58735
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-38875/auxiliary/issue_38875_b.rs b/src/test/ui/issues/issue-38875/auxiliary/issue_38875_b.rs
deleted file mode 100644 (file)
index dd58735..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-38875/issue-38875.rs b/src/test/ui/issues/issue-38875/issue-38875.rs
new file mode 100644 (file)
index 0000000..74db92c
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue-38875-b.rs
+// compile-pass
+
+extern crate issue_38875_b;
+
+fn main() {
+    let test_x = [0; issue_38875_b::FOO];
+}
diff --git a/src/test/ui/issues/issue-38875/issue_38875.rs b/src/test/ui/issues/issue-38875/issue_38875.rs
deleted file mode 100644 (file)
index d9debe3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:issue_38875_b.rs
-// compile-pass
-
-extern crate issue_38875_b;
-
-fn main() {
-    let test_x = [0; issue_38875_b::FOO];
-}
diff --git a/src/test/ui/issues/issue-40827.rs b/src/test/ui/issues/issue-40827.rs
new file mode 100644 (file)
index 0000000..4b079ac
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::rc::Rc;
+use std::sync::Arc;
+
+struct Foo(Arc<Bar>);
+
+enum Bar {
+    A(Rc<Foo>),
+    B(Option<Foo>),
+}
+
+fn f<T: Send>(_: T) {}
+
+fn main() {
+    f(Foo(Arc::new(Bar::B(None))));
+    //~^ ERROR E0277
+    //~| ERROR E0277
+}
diff --git a/src/test/ui/issues/issue-40827.stderr b/src/test/ui/issues/issue-40827.stderr
new file mode 100644 (file)
index 0000000..dd0ebf9
--- /dev/null
@@ -0,0 +1,35 @@
+error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
+  --> $DIR/issue-40827.rs:24:5
+   |
+LL |     f(Foo(Arc::new(Bar::B(None))));
+   |     ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
+   |
+   = help: within `Bar`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<Foo>`
+   = note: required because it appears within the type `Bar`
+   = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
+   = note: required because it appears within the type `Foo`
+note: required by `f`
+  --> $DIR/issue-40827.rs:21:1
+   |
+LL | fn f<T: Send>(_: T) {}
+   | ^^^^^^^^^^^^^^^^^^^
+
+error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
+  --> $DIR/issue-40827.rs:24:5
+   |
+LL |     f(Foo(Arc::new(Bar::B(None))));
+   |     ^ `std::rc::Rc<Foo>` cannot be shared between threads safely
+   |
+   = help: within `Bar`, the trait `std::marker::Sync` is not implemented for `std::rc::Rc<Foo>`
+   = note: required because it appears within the type `Bar`
+   = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
+   = note: required because it appears within the type `Foo`
+note: required by `f`
+  --> $DIR/issue-40827.rs:21:1
+   |
+LL | fn f<T: Send>(_: T) {}
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
index 67be194c8ed2a76fd03b9b8dc69a07f3fc753a41..de52fcfe327227b82a6a0bb8ee71e4b6f0192b84 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_41549.rs
+// aux-build:issue-41549.rs
 
 
 extern crate issue_41549;
diff --git a/src/test/ui/issues/issue-41652/auxiliary/issue-41652-b.rs b/src/test/ui/issues/issue-41652/auxiliary/issue-41652-b.rs
new file mode 100644 (file)
index 0000000..0b71443
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Tr {
+    // Note: The function needs to be declared over multiple lines to reproduce
+    // the crash. DO NOT reformat.
+    fn f()
+        where Self: Sized;
+}
diff --git a/src/test/ui/issues/issue-41652/auxiliary/issue_41652_b.rs b/src/test/ui/issues/issue-41652/auxiliary/issue_41652_b.rs
deleted file mode 100644 (file)
index 0b71443..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Tr {
-    // Note: The function needs to be declared over multiple lines to reproduce
-    // the crash. DO NOT reformat.
-    fn f()
-        where Self: Sized;
-}
diff --git a/src/test/ui/issues/issue-41652/issue-41652.rs b/src/test/ui/issues/issue-41652/issue-41652.rs
new file mode 100644 (file)
index 0000000..4b42c04
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue-41652-b.rs
+
+extern crate issue_41652_b;
+
+struct S;
+
+impl issue_41652_b::Tr for S {
+    fn f() {
+        3.f()
+        //~^ ERROR can't call method `f` on ambiguous numeric type `{integer}`
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-41652/issue-41652.stderr b/src/test/ui/issues/issue-41652/issue-41652.stderr
new file mode 100644 (file)
index 0000000..ed5eb36
--- /dev/null
@@ -0,0 +1,13 @@
+error[E0689]: can't call method `f` on ambiguous numeric type `{integer}`
+  --> $DIR/issue-41652.rs:19:11
+   |
+LL |         3.f()
+   |           ^
+help: you must specify a concrete type for this numeric value, like `i32`
+   |
+LL |         3_i32.f()
+   |         ^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0689`.
diff --git a/src/test/ui/issues/issue-41652/issue_41652.rs b/src/test/ui/issues/issue-41652/issue_41652.rs
deleted file mode 100644 (file)
index a4e9282..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:issue_41652_b.rs
-
-extern crate issue_41652_b;
-
-struct S;
-
-impl issue_41652_b::Tr for S {
-    fn f() {
-        3.f()
-        //~^ ERROR can't call method `f` on ambiguous numeric type `{integer}`
-    }
-}
-
-fn main() {}
diff --git a/src/test/ui/issues/issue-41652/issue_41652.stderr b/src/test/ui/issues/issue-41652/issue_41652.stderr
deleted file mode 100644 (file)
index 3f76b25..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0689]: can't call method `f` on ambiguous numeric type `{integer}`
-  --> $DIR/issue_41652.rs:19:11
-   |
-LL |         3.f()
-   |           ^
-help: you must specify a concrete type for this numeric value, like `i32`
-   |
-LL |         3_i32.f()
-   |         ^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0689`.
index 154bee5d1d4f377649653942a0f64ebcb3a4597b..7018198aff55b270173a37d8f6a6baa8f203deb5 100644 (file)
@@ -12,8 +12,8 @@
 // paths rooted from `std` to be misrendered in the diagnostic output.
 
 // ignore-windows
-// aux-build:xcrate_issue_43189_a.rs
-// aux-build:xcrate_issue_43189_b.rs
+// aux-build:xcrate-issue-43189-a.rs
+// aux-build:xcrate-issue-43189-b.rs
 
 extern crate xcrate_issue_43189_b;
 fn main() {
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue-45829-a.rs b/src/test/ui/issues/issue-45829/auxiliary/issue-45829-a.rs
new file mode 100644 (file)
index 0000000..56eb154
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue-45829-b.rs b/src/test/ui/issues/issue-45829/auxiliary/issue-45829-b.rs
new file mode 100644 (file)
index 0000000..56eb154
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs b/src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs
deleted file mode 100644 (file)
index 56eb154..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs b/src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs
deleted file mode 100644 (file)
index 56eb154..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub const FOO: usize = *&0;
index 5230cadf604304ee6ddfa4401061add0af9c0e52..6befee331d5ae4da33d7c160195e6f6de565e470 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_45829_b.rs
+// aux-build:issue-45829-b.rs
 
 mod foo {
     pub mod bar {}
index 7066ed65c78c30e02184670df0ed8623e35eead4..61c7e915fe88c6495d337a37de8814bb7dcee66c 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_45829_a.rs
-// aux-build:issue_45829_b.rs
+// aux-build:issue-45829-a.rs
+// aux-build:issue-45829-b.rs
 
 extern crate issue_45829_a;
 extern  crate    issue_45829_b  as  issue_45829_a;
index 7c3d97240057462b082f0803f5b9c652bf3ddb67..41e3e8bbe1452ca915bcfb4507138dd0933b8344 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_45829_a.rs
-// aux-build:issue_45829_b.rs
+// aux-build:issue-45829-a.rs
+// aux-build:issue-45829-b.rs
 
 extern crate issue_45829_a;
 extern crate issue_45829_b as issue_45829_a;
index 1cc261ed922eb522c89a19a5ecac29754c636b58..9a2ec7a527326e02489790f3857ce8d41d5ac20e 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// aux-build:issue_45829_b.rs
+// aux-build:issue-45829-b.rs
 
 extern crate issue_45829_b;
 use std as issue_45829_b;
index 698005b5d3068a10ddae00340a5e79ffd3f1bc8b..202c67e584c5dfa5000c286e8e374fb78b685737 100644 (file)
@@ -12,7 +12,7 @@
 // paths rooted from `std` to be misrendered in the diagnostic output.
 
 // ignore-windows
-// aux-build:xcrate_issue_46112_rexport_core.rs
+// aux-build:xcrate-issue-46112-rexport-core.rs
 
 extern crate xcrate_issue_46112_rexport_core;
 fn test(r: Result<Option<()>, &'static str>) { }
diff --git a/src/test/ui/issues/issue-49556.rs b/src/test/ui/issues/issue-49556.rs
new file mode 100644 (file)
index 0000000..7f7b349
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-pass
+fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
+    data.iter()
+        .map(
+            |x| x // fn(&'a usize) -> &'(ReScope) usize
+        )
+        .map(
+            |x| *x // fn(&'(ReScope) usize) -> usize
+        )
+}
+
+fn main() {
+}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.rs
new file mode 100644 (file)
index 0000000..4c67fb3
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(inner_deref)]
+
+fn main() {
+    let _result = &Some(42).deref();
+//~^ ERROR no method named `deref` found for type `std::option::Option<{integer}>`
+}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-deref.stderr
new file mode 100644 (file)
index 0000000..3e255ca
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0599]: no method named `deref` found for type `std::option::Option<{integer}>` in the current scope
+  --> $DIR/option-deref.rs:14:29
+   |
+LL |     let _result = &Some(42).deref();
+   |                             ^^^^^
+   |
+   = note: the method `deref` exists but the following trait bounds were not satisfied:
+           `{integer} : std::ops::Deref`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.rs
deleted file mode 100644 (file)
index 4c67fb3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(inner_deref)]
-
-fn main() {
-    let _result = &Some(42).deref();
-//~^ ERROR no method named `deref` found for type `std::option::Option<{integer}>`
-}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option_deref.stderr
deleted file mode 100644 (file)
index a56cd6e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0599]: no method named `deref` found for type `std::option::Option<{integer}>` in the current scope
-  --> $DIR/option_deref.rs:14:29
-   |
-LL |     let _result = &Some(42).deref();
-   |                             ^^^^^
-   |
-   = note: the method `deref` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.rs
new file mode 100644 (file)
index 0000000..5d1e747
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(inner_deref)]
+
+fn main() {
+    let _result = &Err(41).deref_err();
+//~^ ERROR no method named `deref_err` found
+}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-err.stderr
new file mode 100644 (file)
index 0000000..57b5d07
--- /dev/null
@@ -0,0 +1,13 @@
+error[E0599]: no method named `deref_err` found for type `std::result::Result<_, {integer}>` in the current scope
+  --> $DIR/result-deref-err.rs:14:28
+   |
+LL |     let _result = &Err(41).deref_err();
+   |                            ^^^^^^^^^
+   |
+   = note: the method `deref_err` exists but the following trait bounds were not satisfied:
+           `{integer} : std::ops::Deref`
+   = help: did you mean `deref_ok`?
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.rs
new file mode 100644 (file)
index 0000000..bee8e0c
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(inner_deref)]
+
+fn main() {
+    let _result = &Ok(42).deref_ok();
+//~^ ERROR no method named `deref_ok` found
+}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref-ok.stderr
new file mode 100644 (file)
index 0000000..ee0c439
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0599]: no method named `deref_ok` found for type `std::result::Result<{integer}, _>` in the current scope
+  --> $DIR/result-deref-ok.rs:14:27
+   |
+LL |     let _result = &Ok(42).deref_ok();
+   |                           ^^^^^^^^
+   |
+   = note: the method `deref_ok` exists but the following trait bounds were not satisfied:
+           `{integer} : std::ops::Deref`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.rs
new file mode 100644 (file)
index 0000000..73bdf0b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(inner_deref)]
+
+fn main() {
+    let _result = &Ok(42).deref();
+//~^ ERROR no method named `deref` found
+}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-deref.stderr
new file mode 100644 (file)
index 0000000..46fee66
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0599]: no method named `deref` found for type `std::result::Result<{integer}, _>` in the current scope
+  --> $DIR/result-deref.rs:14:27
+   |
+LL |     let _result = &Ok(42).deref();
+   |                           ^^^^^
+   |
+   = note: the method `deref` exists but the following trait bounds were not satisfied:
+           `{integer} : std::ops::Deref`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.rs
deleted file mode 100644 (file)
index 73bdf0b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(inner_deref)]
-
-fn main() {
-    let _result = &Ok(42).deref();
-//~^ ERROR no method named `deref` found
-}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref.stderr
deleted file mode 100644 (file)
index d3d7c19..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0599]: no method named `deref` found for type `std::result::Result<{integer}, _>` in the current scope
-  --> $DIR/result_deref.rs:14:27
-   |
-LL |     let _result = &Ok(42).deref();
-   |                           ^^^^^
-   |
-   = note: the method `deref` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.rs
deleted file mode 100644 (file)
index 5d1e747..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(inner_deref)]
-
-fn main() {
-    let _result = &Err(41).deref_err();
-//~^ ERROR no method named `deref_err` found
-}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_err.stderr
deleted file mode 100644 (file)
index bf75687..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0599]: no method named `deref_err` found for type `std::result::Result<_, {integer}>` in the current scope
-  --> $DIR/result_deref_err.rs:14:28
-   |
-LL |     let _result = &Err(41).deref_err();
-   |                            ^^^^^^^^^
-   |
-   = note: the method `deref_err` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
-   = help: did you mean `deref_ok`?
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.rs
deleted file mode 100644 (file)
index bee8e0c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(inner_deref)]
-
-fn main() {
-    let _result = &Ok(42).deref_ok();
-//~^ ERROR no method named `deref_ok` found
-}
diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result_deref_ok.stderr
deleted file mode 100644 (file)
index a77333a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0599]: no method named `deref_ok` found for type `std::result::Result<{integer}, _>` in the current scope
-  --> $DIR/result_deref_ok.rs:14:27
-   |
-LL |     let _result = &Ok(42).deref_ok();
-   |                           ^^^^^^^^
-   |
-   = note: the method `deref_ok` exists but the following trait bounds were not satisfied:
-           `{integer} : std::ops::Deref`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0599`.
diff --git a/src/test/ui/issues/issue-51602.rs b/src/test/ui/issues/issue-51602.rs
new file mode 100644 (file)
index 0000000..a3edecb
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main(){
+    if i in 1..10 {
+        break;
+    }
+}
diff --git a/src/test/ui/issues/issue-51602.stderr b/src/test/ui/issues/issue-51602.stderr
new file mode 100644 (file)
index 0000000..d50ee64
--- /dev/null
@@ -0,0 +1,10 @@
+error: expected `{`, found keyword `in`
+  --> $DIR/issue-51602.rs:12:10
+   |
+LL |     if i in 1..10 {
+   |     --   ^^ expected `{`
+   |     |
+   |     this `if` statement has a condition, but no block
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/issues/issue-52717.rs b/src/test/ui/issues/issue-52717.rs
new file mode 100644 (file)
index 0000000..d40e2bd
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+enum A {
+  A {
+    foo: usize,
+  }
+}
+
+fn main() {
+  let x = A::A { foo: 3 };
+  match x {
+    A::A { fob } => { println!("{}", fob); }
+  }
+}
diff --git a/src/test/ui/issues/issue-52717.stderr b/src/test/ui/issues/issue-52717.stderr
new file mode 100644 (file)
index 0000000..0ef5a84
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0026]: variant `A::A` does not have a field named `fob`
+  --> $DIR/issue-52717.rs:19:12
+   |
+LL |     A::A { fob } => { println!("{}", fob); }
+   |            ^^^
+   |            |
+   |            variant `A::A` does not have this field
+   |            help: did you mean: `foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0026`.
diff --git a/src/test/ui/issues/issue-52992.rs b/src/test/ui/issues/issue-52992.rs
new file mode 100644 (file)
index 0000000..2ece0ee
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Regression test for an NLL-related ICE (#52992) -- computing
+// implied bounds was causing outlives relations that were not
+// properly handled.
+//
+// compile-pass
+
+#![feature(nll)]
+
+fn main() {}
+
+fn fail<'a>() -> Struct<'a, Generic<()>> {
+    Struct(&Generic(()))
+}
+
+struct Struct<'a, T>(&'a T) where
+    T: Trait + 'a,
+    T::AT: 'a; // only fails with this bound
+
+struct Generic<T>(T);
+
+trait Trait {
+    type AT;
+}
+
+impl<T> Trait for Generic<T> {
+    type AT = T; // only fails with a generic AT
+}
diff --git a/src/test/ui/issues/issue-53251.rs b/src/test/ui/issues/issue-53251.rs
new file mode 100644 (file)
index 0000000..8c75ea4
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+struct S;
+
+impl S {
+    fn f() {}
+}
+
+macro_rules! impl_add {
+    ($($n:ident)*) => {
+        $(
+            fn $n() {
+                S::f::<i64>();
+                //~^ ERROR wrong number of type arguments
+            }
+        )*
+    }
+}
+
+impl_add!(a b);
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-53251.stderr b/src/test/ui/issues/issue-53251.stderr
new file mode 100644 (file)
index 0000000..51ea745
--- /dev/null
@@ -0,0 +1,12 @@
+error[E0107]: wrong number of type arguments: expected 0, found 1
+  --> $DIR/issue-53251.rs:21:24
+   |
+LL |                 S::f::<i64>();
+   |                        ^^^ unexpected type argument
+...
+LL | impl_add!(a b);
+   | --------------- in this macro invocation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0107`.
diff --git a/src/test/ui/issues/issue-53300.rs b/src/test/ui/issues/issue-53300.rs
new file mode 100644 (file)
index 0000000..d055a6f
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// issue 53300
+
+pub trait A {
+    fn add(&self, b: i32) -> i32;
+}
+
+fn addition() -> Wrapper<impl A> {}
+//~^ ERROR cannot find type `Wrapper` in this scope [E0412]
+
+fn main() {
+    let res = addition();
+}
diff --git a/src/test/ui/issues/issue-53300.stderr b/src/test/ui/issues/issue-53300.stderr
new file mode 100644 (file)
index 0000000..920287a
--- /dev/null
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `Wrapper` in this scope
+  --> $DIR/issue-53300.rs:17:18
+   |
+LL | fn addition() -> Wrapper<impl A> {}
+   |                  ^^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/issues/issue-53419.rs b/src/test/ui/issues/issue-53419.rs
new file mode 100644 (file)
index 0000000..0dd5a85
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//compile-pass
+
+struct Foo {
+    bar: for<'r> Fn(usize, &'r FnMut())
+}
+
+fn main() {
+}
+
diff --git a/src/test/ui/issues/issue-53565.rs b/src/test/ui/issues/issue-53565.rs
new file mode 100644 (file)
index 0000000..2bf3829
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+use std::time::{foo, bar, buzz};
+use std::time::{abc, def};
+fn main(){
+   println!("Hello World!");
+}
diff --git a/src/test/ui/issues/issue-53565.stderr b/src/test/ui/issues/issue-53565.stderr
new file mode 100644 (file)
index 0000000..945f5ef
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0432]: unresolved imports `std::time::foo`, `std::time::bar`, `std::time::buzz`
+  --> $DIR/issue-53565.rs:10:17
+   |
+LL | use std::time::{foo, bar, buzz};
+   |                 ^^^  ^^^  ^^^^ no `buzz` in `time`
+   |                 |    |
+   |                 |    no `bar` in `time`
+   |                 no `foo` in `time`
+
+error[E0432]: unresolved imports `std::time::abc`, `std::time::def`
+  --> $DIR/issue-53565.rs:11:17
+   |
+LL | use std::time::{abc, def};
+   |                 ^^^  ^^^ no `def` in `time`
+   |                 |
+   |                 no `abc` in `time`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/ui/issues/issue-53568.rs b/src/test/ui/issues/issue-53568.rs
new file mode 100644 (file)
index 0000000..6b479f7
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Regression test for an NLL-related ICE (#53568) -- we failed to
+// resolve inference variables in "custom type-ops".
+//
+// compile-pass
+
+#![feature(nll)]
+#![allow(dead_code)]
+
+trait Future {
+    type Item;
+}
+
+impl<F, T> Future for F
+where F: Fn() -> T
+{
+    type Item = T;
+}
+
+trait Connect {}
+
+struct Connector<H> {
+    handler: H,
+}
+
+impl<H, T> Connect for Connector<H>
+where
+    T: 'static,
+    H: Future<Item = T>
+{
+}
+
+struct Client<C> {
+    connector: C,
+}
+
+fn build<C>(_connector: C) -> Client<C> {
+    unimplemented!()
+}
+
+fn client<H>(handler: H) -> Client<impl Connect>
+where H: Fn() + Copy
+{
+    let connector = Connector {
+        handler,
+    };
+    let client = build(connector);
+    client
+}
+
+fn main() { }
+
diff --git a/src/test/ui/issues/issue-53692.rs b/src/test/ui/issues/issue-53692.rs
new file mode 100644 (file)
index 0000000..0b6cc36
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+fn main() {
+        let items = vec![1, 2, 3];
+        let ref_items: &[i32] = &items;
+        let items_clone: Vec<i32> = ref_items.clone();
+
+        // in that case no suggestion will be triggered
+        let items_clone_2:Vec<i32> = items.clone();
+
+        let s = "hi";
+        let string: String = s.clone();
+
+        // in that case no suggestion will be triggered
+        let s2 = "hi";
+        let string_2: String = s2.to_string();
+}
diff --git a/src/test/ui/issues/issue-53692.stderr b/src/test/ui/issues/issue-53692.stderr
new file mode 100644 (file)
index 0000000..9cd8a53
--- /dev/null
@@ -0,0 +1,27 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-53692.rs:13:37
+   |
+LL |         let items_clone: Vec<i32> = ref_items.clone();
+   |                                     ^^^^^^^^^^^^^^^^^
+   |                                     |
+   |                                     expected struct `std::vec::Vec`, found &[i32]
+   |                                     help: try using a conversion method: `ref_items.to_vec()`
+   |
+   = note: expected type `std::vec::Vec<i32>`
+              found type `&[i32]`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-53692.rs:19:30
+   |
+LL |         let string: String = s.clone();
+   |                              ^^^^^^^^^
+   |                              |
+   |                              expected struct `std::string::String`, found &str
+   |                              help: try using a conversion method: `s.to_string()`
+   |
+   = note: expected type `std::string::String`
+              found type `&str`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/issues/issue-53840.rs b/src/test/ui/issues/issue-53840.rs
new file mode 100644 (file)
index 0000000..ece3caf
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+enum E {
+    Foo(String, String, String),
+}
+
+struct Bar {
+    a: String,
+    b: String,
+}
+
+fn main() {
+    let bar = Bar { a: "1".to_string(), b: "2".to_string() };
+    match E::Foo("".into(), "".into(), "".into()) {
+        E::Foo(a, b, ref c) => {}
+    }
+    match bar {
+        Bar {a, ref b} => {}
+    }
+}
diff --git a/src/test/ui/issues/issue-53840.stderr b/src/test/ui/issues/issue-53840.stderr
new file mode 100644 (file)
index 0000000..961e4c0
--- /dev/null
@@ -0,0 +1,20 @@
+error[E0009]: cannot bind by-move and by-ref in the same pattern
+  --> $DIR/issue-53840.rs:22:16
+   |
+LL |         E::Foo(a, b, ref c) => {}
+   |                ^  ^  ----- both by-ref and by-move used
+   |                |  |
+   |                |  by-move pattern here
+   |                by-move pattern here
+
+error[E0009]: cannot bind by-move and by-ref in the same pattern
+  --> $DIR/issue-53840.rs:25:14
+   |
+LL |         Bar {a, ref b} => {}
+   |              ^  ----- both by-ref and by-move used
+   |              |
+   |              by-move pattern here
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0009`.
diff --git a/src/test/ui/issues/issue-54302-cases.rs b/src/test/ui/issues/issue-54302-cases.rs
new file mode 100644 (file)
index 0000000..6d1c61c
--- /dev/null
@@ -0,0 +1,95 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Mirror {
+    type Image;
+    fn coerce(self) -> Self::Image;
+}
+
+impl<T> Mirror for T {
+    type Image = T;
+    fn coerce(self) -> Self { self }
+}
+
+trait Foo<'x, T> {
+    fn foo(self) -> &'x T;
+}
+
+impl<'s, 'x, T: 'x> Foo<'x, T> for &'s T where &'s T: Foo2<'x, T> {
+    fn foo(self) -> &'x T { self.foo2() }
+}
+
+trait Foo2<'x, T> {
+    fn foo2(self) -> &'x T;
+}
+
+// example 1 - fails leak check
+impl<'x> Foo2<'x, u32> for &'x u32
+{
+    fn foo2(self) -> &'x u32 { self }
+}
+
+// example 2 - OK with this issue
+impl<'x, 'a: 'x> Foo2<'x, i32> for &'a i32
+{
+    fn foo2(self) -> &'x i32 { self }
+}
+
+// example 3 - fails due to issue #XYZ + Leak-check
+impl<'x, T> Foo2<'x, u64> for T
+    where T: Mirror<Image=&'x u64>
+{
+    fn foo2(self) -> &'x u64 { self.coerce() }
+}
+
+// example 4 - fails due to issue #XYZ
+impl<'x, 'a: 'x, T> Foo2<'x, i64> for T
+    where T: Mirror<Image=&'a i64>
+{
+    fn foo2(self) -> &'x i64 { self.coerce() }
+}
+
+
+trait RefFoo<T> {
+    fn ref_foo(&self) -> &'static T;
+}
+
+impl<T> RefFoo<T> for T where for<'a> &'a T: Foo<'static, T> {
+    fn ref_foo(&self) -> &'static T {
+        self.foo()
+    }
+}
+
+
+fn coerce_lifetime1(a: &u32) -> &'static u32
+{
+    <u32 as RefFoo<u32>>::ref_foo(a)
+    //~^ ERROR the trait bound `for<'a> &'a u32: Foo2<'_, u32>` is not satisfied
+}
+
+fn coerce_lifetime2(a: &i32) -> &'static i32
+{
+    <i32 as RefFoo<i32>>::ref_foo(a)
+    //~^ ERROR the requirement `for<'a> 'a : ` is not satisfied
+}
+
+fn coerce_lifetime3(a: &u64) -> &'static u64
+{
+    <u64 as RefFoo<u64>>::ref_foo(a)
+    //~^ ERROR type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`
+}
+
+fn coerce_lifetime4(a: &i64) -> &'static i64
+{
+    <i64 as RefFoo<i64>>::ref_foo(a)
+    //~^ ERROR type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`
+}
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-54302-cases.stderr b/src/test/ui/issues/issue-54302-cases.stderr
new file mode 100644 (file)
index 0000000..9603f7a
--- /dev/null
@@ -0,0 +1,65 @@
+error[E0277]: the trait bound `for<'a> &'a u32: Foo2<'_, u32>` is not satisfied
+  --> $DIR/issue-54302-cases.rs:73:5
+   |
+LL |     <u32 as RefFoo<u32>>::ref_foo(a)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo2<'_, u32>` is not implemented for `&'a u32`
+   |
+   = help: the following implementations were found:
+             <&'x u32 as Foo2<'x, u32>>
+   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u32>` for `&'a u32`
+   = note: required because of the requirements on the impl of `RefFoo<u32>` for `u32`
+note: required by `RefFoo::ref_foo`
+  --> $DIR/issue-54302-cases.rs:61:5
+   |
+LL |     fn ref_foo(&self) -> &'static T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0279]: the requirement `for<'a> 'a : ` is not satisfied (`expected bound lifetime parameter 'a, found concrete lifetime`)
+  --> $DIR/issue-54302-cases.rs:79:5
+   |
+LL |     <i32 as RefFoo<i32>>::ref_foo(a)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, i32>` for `&'a i32`
+   = note: required because of the requirements on the impl of `for<'a> Foo<'static, i32>` for `&'a i32`
+   = note: required because of the requirements on the impl of `RefFoo<i32>` for `i32`
+note: required by `RefFoo::ref_foo`
+  --> $DIR/issue-54302-cases.rs:61:5
+   |
+LL |     fn ref_foo(&self) -> &'static T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0271]: type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`
+  --> $DIR/issue-54302-cases.rs:85:5
+   |
+LL |     <u64 as RefFoo<u64>>::ref_foo(a)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime
+   |
+   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, u64>` for `&'a u64`
+   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u64>` for `&'a u64`
+   = note: required because of the requirements on the impl of `RefFoo<u64>` for `u64`
+note: required by `RefFoo::ref_foo`
+  --> $DIR/issue-54302-cases.rs:61:5
+   |
+LL |     fn ref_foo(&self) -> &'static T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0271]: type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`
+  --> $DIR/issue-54302-cases.rs:91:5
+   |
+LL |     <i64 as RefFoo<i64>>::ref_foo(a)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime
+   |
+   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, i64>` for `&'a i64`
+   = note: required because of the requirements on the impl of `for<'a> Foo<'static, i64>` for `&'a i64`
+   = note: required because of the requirements on the impl of `RefFoo<i64>` for `i64`
+note: required by `RefFoo::ref_foo`
+  --> $DIR/issue-54302-cases.rs:61:5
+   |
+LL |     fn ref_foo(&self) -> &'static T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0271, E0277, E0279.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/src/test/ui/issues/issue-54302.rs b/src/test/ui/issues/issue-54302.rs
new file mode 100644 (file)
index 0000000..969d19c
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Deserialize<'de> {}
+
+trait DeserializeOwned: for<'de> Deserialize<'de> {}
+impl<T> DeserializeOwned for T where T: for<'de> Deserialize<'de> {}
+
+// Based on this impl, `&'static str` only implements Deserialize<'static>.
+// It does not implement for<'de> Deserialize<'de>.
+impl<'de: 'a, 'a> Deserialize<'de> for &'a str {}
+
+fn main() {
+    // Then why does it implement DeserializeOwned? This compiles.
+    fn assert_deserialize_owned<T: DeserializeOwned>() {}
+    assert_deserialize_owned::<&'static str>();
+    //~^ ERROR the requirement `for<'de> 'de : ` is not satisfied
+
+    // It correctly does not implement for<'de> Deserialize<'de>.
+    //fn assert_hrtb<T: for<'de> Deserialize<'de>>() {}
+    //assert_hrtb::<&'static str>();
+}
diff --git a/src/test/ui/issues/issue-54302.stderr b/src/test/ui/issues/issue-54302.stderr
new file mode 100644 (file)
index 0000000..f122dae
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0279]: the requirement `for<'de> 'de : ` is not satisfied (`expected bound lifetime parameter 'de, found concrete lifetime`)
+  --> $DIR/issue-54302.rs:23:5
+   |
+LL |     assert_deserialize_owned::<&'static str>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: required because of the requirements on the impl of `for<'de> Deserialize<'de>` for `&'static str`
+   = note: required because of the requirements on the impl of `DeserializeOwned` for `&'static str`
+note: required by `main::assert_deserialize_owned`
+  --> $DIR/issue-54302.rs:22:5
+   |
+LL |     fn assert_deserialize_owned<T: DeserializeOwned>() {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0279`.
index 02e5b9b092197f94b08fe0a7452081a22002fe78..329bfd1dde0f963676680b57d7c94c8eae953f2a 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//aux-build:issue_5844_aux.rs
+//aux-build:issue-5844-aux.rs
 
 extern crate issue_5844_aux;
 
diff --git a/src/test/ui/issues/issue32829.rs b/src/test/ui/issues/issue32829.rs
deleted file mode 100644 (file)
index 2b223ba..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-tidy-linelength
-
-#![feature(const_fn)]
-
-const bad : u32 = {
-    {
-        5;
-        //~^ ERROR statements in constants are unstable
-        0
-    }
-};
-
-const bad_two : u32 = {
-    {
-        invalid();
-        //~^ ERROR statements in constants are unstable
-        //~^^ ERROR: calls in constants are limited to constant functions, tuple structs and tuple variants
-        0
-    }
-};
-
-const bad_three : u32 = {
-    {
-        valid();
-        //~^ ERROR statements in constants are unstable
-        0
-    }
-};
-
-static bad_four : u32 = {
-    {
-        5;
-        //~^ ERROR statements in statics are unstable
-        0
-    }
-};
-
-static bad_five : u32 = {
-    {
-        invalid();
-        //~^ ERROR: calls in statics are limited to constant functions, tuple structs and tuple variants
-        //~| ERROR statements in statics are unstable
-        0
-    }
-};
-
-static bad_six : u32 = {
-    {
-        valid();
-        //~^ ERROR statements in statics are unstable
-        0
-    }
-};
-
-static mut bad_seven : u32 = {
-    {
-        5;
-        //~^ ERROR statements in statics are unstable
-        0
-    }
-};
-
-static mut bad_eight : u32 = {
-    {
-        invalid();
-        //~^ ERROR statements in statics are unstable
-        //~| ERROR: calls in statics are limited to constant functions, tuple structs and tuple variants
-        0
-    }
-};
-
-static mut bad_nine : u32 = {
-    {
-        valid();
-        //~^ ERROR statements in statics are unstable
-        0
-    }
-};
-
-
-fn invalid() {}
-const fn valid() {}
-
-fn main() {}
diff --git a/src/test/ui/issues/issue32829.stderr b/src/test/ui/issues/issue32829.stderr
deleted file mode 100644 (file)
index dad0880..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-error[E0658]: statements in constants are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:17:9
-   |
-LL |         5;
-   |         ^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
-  --> $DIR/issue32829.rs:25:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-
-error[E0658]: statements in constants are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:25:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0658]: statements in constants are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:34:9
-   |
-LL |         valid();
-   |         ^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:42:9
-   |
-LL |         5;
-   |         ^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
-  --> $DIR/issue32829.rs:50:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:50:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:59:9
-   |
-LL |         valid();
-   |         ^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:67:9
-   |
-LL |         5;
-   |         ^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
-  --> $DIR/issue32829.rs:75:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:75:9
-   |
-LL |         invalid();
-   |         ^^^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error[E0658]: statements in statics are unstable (see issue #48821)
-  --> $DIR/issue32829.rs:84:9
-   |
-LL |         valid();
-   |         ^^^^^^^
-   |
-   = help: add #![feature(const_let)] to the crate attributes to enable
-
-error: aborting due to 12 previous errors
-
-Some errors occurred: E0015, E0658.
-For more information about an error, try `rustc --explain E0015`.