Auto merge of #54767 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests Successful merges: - #54269 (#53840: Consolidate pattern check errors) - #54458 (Allow both explicit and elided lifetimes in the same impl header) - #54603 (Add `crate::` to trait suggestions in Rust 2018.) - #54648 (Update Cargo's submodule) - #54680 (make run-pass tests with empty main just compile-pass tests) - #54687 (Use impl_header_lifetime_elision in libcore) - #54699 (Re-export `getopts` so custom drivers can reference it.) - #54702 (do not promote comparing function pointers) - #54728 (Renumber `proc_macro` tracking issues) - #54745 (make `CStr::from_bytes_with_nul_unchecked()` a const fn) Failed merges: r? @ghost
This commit is contained in:
commit
4cf11765dc
281 changed files with 937 additions and 538 deletions
8
src/test/run-pass/issues/issue-54696.rs
Normal file
8
src/test/run-pass/issues/issue-54696.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// run-pass
|
||||
|
||||
fn main() {
|
||||
// We shouldn't promote this
|
||||
&(main as fn() == main as fn());
|
||||
// Also check nested case
|
||||
&(&(main as fn()) == &(main as fn()));
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span)]
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span)]
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ LL | impl Copy for &'static NotSync {}
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: conflicting implementation in crate `core`:
|
||||
- impl<'a, T> std::marker::Copy for &'a T
|
||||
- impl<'_, T> std::marker::Copy for &T
|
||||
where T: ?Sized;
|
||||
|
||||
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
|
||||
|
|
@ -24,7 +24,7 @@ LL | impl Copy for &'static [NotSync] {}
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: conflicting implementation in crate `core`:
|
||||
- impl<'a, T> std::marker::Copy for &'a T
|
||||
- impl<'_, T> std::marker::Copy for &T
|
||||
where T: ?Sized;
|
||||
|
||||
error[E0206]: the trait `Copy` may not be implemented for this type
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ error[E0716]: temporary value dropped while borrowed
|
|||
|
|
||||
LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
|
||||
...
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
|
||||
|
|
@ -25,11 +25,22 @@ error[E0716]: temporary value dropped while borrowed
|
|||
|
|
||||
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/promoted_raw_ptr_ops.rs:18:29
|
||||
|
|
||||
LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary which is freed while still in use
|
||||
LL | }
|
||||
| - temporary value is freed at the end of this statement
|
||||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0716`.
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ fn main() {
|
|||
//~^ ERROR does not live long enough
|
||||
let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough
|
||||
let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
|
||||
let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ error[E0597]: borrowed value does not live long enough
|
|||
|
|
||||
LL | let y: &'static usize = &(&1 as *const i32 as usize + 1); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
|
||||
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
|
||||
...
|
||||
LL | }
|
||||
| - temporary value only lives until here
|
||||
|
|
||||
|
|
@ -25,11 +25,22 @@ error[E0597]: borrowed value does not live long enough
|
|||
|
|
||||
LL | let z: &'static i32 = &(unsafe { *(42 as *const i32) }); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
|
||||
LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough
|
||||
LL | }
|
||||
| - temporary value only lives until here
|
||||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0597]: borrowed value does not live long enough
|
||||
--> $DIR/promoted_raw_ptr_ops.rs:18:29
|
||||
|
|
||||
LL | let a: &'static bool = &(main as fn() == main as fn()); //~ ERROR does not live long enough
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
|
||||
LL | }
|
||||
| - temporary value only lives until here
|
||||
|
|
||||
= note: borrowed value must be valid for the static lifetime...
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0597`.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | impl<Foo> Deref for Foo { } //~ ERROR must be used
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: conflicting implementation in crate `core`:
|
||||
- impl<'a, T> std::ops::Deref for &'a T
|
||||
- impl<'_, T> std::ops::Deref for &T
|
||||
where T: ?Sized;
|
||||
|
||||
error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct<Foo>`)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
// 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.
|
||||
|
||||
// run-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
#![feature(impl_header_lifetime_elision)]
|
||||
|
||||
// This works for functions...
|
||||
fn foo<'a>(x: &str, y: &'a str) {}
|
||||
|
||||
// ...so this should work for impls
|
||||
impl<'a> Foo<&str> for &'a str {}
|
||||
trait Foo<T> {}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
27
src/test/ui/issue-53840.rs
Normal file
27
src/test/ui/issue-53840.rs
Normal file
|
|
@ -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} => {}
|
||||
}
|
||||
}
|
||||
20
src/test/ui/issue-53840.stderr
Normal file
20
src/test/ui/issue-53840.stderr
Normal file
|
|
@ -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`.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
enum Foo<'s> {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
pub struct Foo;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Common { fn dummy(&self) { } }
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
//! Ensure the private trait Bar isn't complained about.
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// #11612
|
||||
// We weren't updating the auto adjustments with all the resolved
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_attributes)]
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
use std::slice;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// defining static with struct that contains enum
|
||||
// with &'static str variant used to cause ICE
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
pub struct Foo<'a, 'b: 'a> { foo: &'a &'b isize }
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(unused_imports, dead_code)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo: Sized {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_imports)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#[deny(dead_code)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait Reader {}
|
||||
|
||||
enum Wrapper<'a> {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
pub type BigRat<T = isize> = T;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_macros)]
|
||||
#![allow(dead_code)]
|
||||
#![feature(asm)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(fn_traits, unboxed_closures)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
struct A<'a> {
|
||||
a: &'a i32,
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
trait MatrixRow { fn dummy(&self) { }}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
struct Parser<'a, I, O> {
|
||||
parse: Box<FnMut(I) -> Result<O, String> + 'a>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
// ignore-cloudabi no std::fs
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_must_use)]
|
||||
#[allow(dead_code)]
|
||||
fn check(a: &str) {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code, warnings)]
|
||||
|
||||
static mut x: isize = 3;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
struct A;
|
||||
impl Drop for A {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Regression test for #17746
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Test that we can parse where clauses on various forms of tuple
|
||||
// structs.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
// These crossed imports should resolve fine, and not block on
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
|
||||
pub trait Indexable<T>: std::ops::Index<usize, Output = T> {
|
||||
fn index2(&self, i: usize) -> &T {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
pub trait Promisable: Send + Sync {}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Test that methods in trait impls should override default methods.
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#[derive(Eq, PartialEq, PartialOrd, Ord)]
|
||||
enum Test<'a> {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
trait Tup {
|
||||
type T0;
|
||||
type T1;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
pub trait Foo : Send { }
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait Hasher {
|
||||
type State;
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// regression test for #19097
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait Handler {
|
||||
fn handle(&self, _: &mut String);
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_imports)]
|
||||
#![deny(unused_qualifications)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Trait<Input> {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_variables)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait T {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
use std::any::TypeId;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
trait Base {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_variables)]
|
||||
// Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
|
||||
// bindings
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(fn_traits, unboxed_closures)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// Check that associated types are `Sized`
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(stable_features)]
|
||||
|
||||
// ignore-cloudabi no processes
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
struct Foo;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(unused_must_use)]
|
||||
use std::thread;
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// test that autoderef of a type like this does not
|
||||
// cause compiler to loop. Note that no instances
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(stable_features)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// ignore-cloudabi no std::fs
|
||||
|
||||
// Regression test for #20797.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait Subscriber {
|
||||
type Input;
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait Trait where Self::Out: std::fmt::Display {
|
||||
type Out;
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
trait Trait<'a> {
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Regression test for issue #21245. Check that we are able to infer
|
||||
// the types in these examples correctly. It used to be that
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![no_implicit_prelude]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Test that the requirement (in `Bar`) that `T::Bar : 'static` does
|
||||
// not wind up propagating to `T`.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(stable_features)]
|
||||
|
||||
#![feature(cfg_target_feature)]
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
// Regression test for #21726: an issue arose around the rules for
|
||||
// subtyping of projection types that resulted in an unconstrained
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
pub trait LineFormatter<'a> {
|
||||
type Iter: Iterator<Item=&'a str> + 'a;
|
||||
fn iter(&'a self, line: &'a str) -> Self::Iter;
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
#![allow(type_alias_bounds)]
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
// compile-pass
|
||||
trait A<T: A<T>> {}
|
||||
|
||||
fn main() {}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue