resolved conflict with upstream commit

This commit is contained in:
Brad Gibson 2018-05-06 07:56:53 -07:00
commit 6a78c0a10f
554 changed files with 10878 additions and 4869 deletions

View file

@ -29,7 +29,6 @@ pub enum Enum4 {
A(i32),
B(i32),
}
// CHECK: %Enum4 = type { [0 x i32], i32, [1 x i32] }
// CHECK: %"Enum4::A" = type { [1 x i32], i32, [0 x i32] }
pub enum Enum64 {
@ -59,7 +58,7 @@ pub fn nested64(a: Align64, b: i32, c: i32, d: i8) -> Nested64 {
// CHECK-LABEL: @enum4
#[no_mangle]
pub fn enum4(a: i32) -> Enum4 {
// CHECK: %e4 = alloca %Enum4, align 4
// CHECK: %e4 = alloca { i32, i32 }, align 4
let e4 = Enum4::A(a);
e4
}

View file

@ -0,0 +1,29 @@
// 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.
// Checks that range metadata gets emitted on calls to functions returning a
// scalar value.
// compile-flags: -C no-prepopulate-passes
// min-llvm-version 4.0
#![crate_type = "lib"]
pub fn test() {
// CHECK: call i8 @some_true(), !range [[R0:![0-9]+]]
// CHECK: [[R0]] = !{i8 0, i8 3}
some_true();
}
#[no_mangle]
fn some_true() -> Option<bool> {
Some(true)
}

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -7,10 +7,10 @@
// <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-flags: -C no-prepopulate-passes -C force-frame-pointers=y
#![no_std]
#![feature(macro_reexport)]
#![crate_type="lib"]
#[allow(unused_extern_crates)]
#[macro_reexport] //~ ERROR bad macro re-export
extern crate std;
// CHECK: attributes #{{.*}} "no-frame-pointer-elim"="true"
pub fn foo() {}

View file

@ -145,6 +145,18 @@ pub fn return_slice(x: &[u16]) -> &[u16] {
x
}
// CHECK: { i16, i16 } @enum_id_1(i16 %x.0, i16 %x.1)
#[no_mangle]
pub fn enum_id_1(x: Option<Result<u16, u16>>) -> Option<Result<u16, u16>> {
x
}
// CHECK: i16 @enum_id_2(i16)
#[no_mangle]
pub fn enum_id_2(x: Option<u8>) -> Option<u8> {
x
}
// CHECK: noalias i8* @allocator()
#[no_mangle]
#[allocator]

View file

@ -25,16 +25,16 @@ pub fn test() {
let b = &Some(a);
&b; // keep variable in an alloca
// CHECK: [[S_b:%[0-9]+]] = bitcast %"core::option::Option<i32>"** %b to i8*
// CHECK: [[S_b:%[0-9]+]] = bitcast { i32, i32 }** %b to i8*
// CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, i8* [[S_b]])
// CHECK: [[S__4:%[0-9]+]] = bitcast %"core::option::Option<i32>"* %_4 to i8*
// CHECK: [[S__4:%[0-9]+]] = bitcast { i32, i32 }* %_4 to i8*
// CHECK: call void @llvm.lifetime.start{{.*}}(i{{[0-9 ]+}}, i8* [[S__4]])
// CHECK: [[E_b:%[0-9]+]] = bitcast %"core::option::Option<i32>"** %b to i8*
// CHECK: [[E_b:%[0-9]+]] = bitcast { i32, i32 }** %b to i8*
// CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, i8* [[E_b]])
// CHECK: [[E__4:%[0-9]+]] = bitcast %"core::option::Option<i32>"* %_4 to i8*
// CHECK: [[E__4:%[0-9]+]] = bitcast { i32, i32 }* %_4 to i8*
// CHECK: call void @llvm.lifetime.end{{.*}}(i{{[0-9 ]+}}, i8* [[E__4]])
}

View file

@ -8,17 +8,27 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: -g -C no-prepopulate-passes
// ignore-tidy-linelength
// min-llvm-version 4.0
// compile-flags: -g -C no-prepopulate-passes
#![crate_type = "lib"]
// CHECK: {{.*}}DISubprogram{{.*}}name: "foo"{{.*}}DIFlagNoReturn
fn foo() -> ! {
#[no_mangle]
pub fn foo() -> ! {
// CHECK: @foo() unnamed_addr #0
loop {}
}
pub fn main() {
foo();
pub enum EmptyEnum {}
#[no_mangle]
pub fn bar() -> EmptyEnum {
// CHECK: @bar() unnamed_addr #0
loop {}
}
// CHECK: attributes #0 = {{{.*}} noreturn {{.*}}}
// CHECK: DISubprogram(name: "foo", {{.*}} DIFlagNoReturn
// CHECK: DISubprogram(name: "bar", {{.*}} DIFlagNoReturn

View file

@ -0,0 +1,19 @@
// 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.
// only-x86_64
// compile-flags: -C target-feature=+avx
#![crate_type = "lib"]
#[no_mangle]
pub fn foo() {
// CHECK: attributes #0 = { {{.*}}"target-features"="+avx"{{.*}} }
}

View file

@ -117,7 +117,7 @@ fn expand_duplicate(cx: &mut ExtCtxt,
let copy_name = match mi.node {
ast::MetaItemKind::List(ref xs) => {
if let Some(word) = xs[0].word() {
word.ident
word.ident.segments.last().unwrap().ident
} else {
cx.span_err(mi.span, "Expected word");
return;

View file

@ -24,9 +24,17 @@ use foo::*;
#[foo::a] //~ ERROR: paths of length greater than one
fn _test() {}
fn _test_inner() {
#![a] // OK
}
#[a] //~ ERROR: custom attributes cannot be applied to modules
mod _test2 {}
mod _test2_inner {
#![a] //~ ERROR: custom attributes cannot be applied to modules
}
#[a = y] //~ ERROR: must only be followed by a delimiter token
fn _test3() {}
@ -36,19 +44,40 @@ fn _test4() {}
#[a () = ] //~ ERROR: must only be followed by a delimiter token
fn _test5() {}
fn main() {
fn attrs() {
// Statement, item
#[a] // OK
struct S;
// Statement, macro
#[a] //~ ERROR: custom attributes cannot be applied to statements
println!();
// Statement, semi
#[a] //~ ERROR: custom attributes cannot be applied to statements
S;
// Statement, local
#[a] //~ ERROR: custom attributes cannot be applied to statements
let _x = 2;
let _x = #[a] 2;
//~^ ERROR: custom attributes cannot be applied to expressions
let _x: m!(u32) = 3;
//~^ ERROR: procedural macros cannot be expanded to types
if let m!(Some(_x)) = Some(3) {
//~^ ERROR: procedural macros cannot be expanded to patterns
}
let _x = m!(3);
//~^ ERROR: procedural macros cannot be expanded to expressions
m!(let _x = 3;);
//~^ ERROR: procedural macros cannot be expanded to statements
// Expr
let _x = #[a] 2; //~ ERROR: custom attributes cannot be applied to expressions
// Opt expr
let _x = [#[a] 2]; //~ ERROR: custom attributes cannot be applied to expressions
// Expr macro
let _x = #[a] println!(); //~ ERROR: custom attributes cannot be applied to expressions
}
fn main() {
let _x: m!(u32) = 3; //~ ERROR: procedural macros cannot be expanded to types
if let m!(Some(_x)) = Some(3) {} //~ ERROR: procedural macros cannot be expanded to patterns
m!(struct S;); //~ ERROR: procedural macros cannot be expanded to statements
m!(let _x = 3;); //~ ERROR: procedural macros cannot be expanded to statements
let _x = m!(3); //~ ERROR: procedural macros cannot be expanded to expressions
let _x = [m!(3)]; //~ ERROR: procedural macros cannot be expanded to expressions
}

View file

@ -13,7 +13,7 @@
#[inline]
fn f() {}
#[inline] //~ ERROR: attribute should be applied to function
#[inline] //~ ERROR: attribute should be applied to function or closure
struct S;
fn main() {}

View file

@ -1,19 +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.
#![crate_type = "dylib"]
// Since we load a serialized macro with all its attributes, accidentally
// re-exporting a `#[macro_export] macro_rules!` is something of a concern!
//
// We avoid it at the moment only because of the order in which we do things.
#[macro_use] #[no_link]
extern crate macro_reexport_1;

View file

@ -10,7 +10,7 @@
// ignore-tidy-linelength
// revisions: nll_beyond nll_target
// revisions: nll_target
// The following revisions are disabled due to missing support from two-phase beyond autorefs
//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-borrows -Z two-phase-beyond-autoref

View file

@ -10,7 +10,7 @@
// #41719
#![feature(use_extern_macros, proc_macro_path_invoc)]
#![feature(use_extern_macros)]
fn main() {
enum Foo {}

View file

@ -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() {
#[rustfmt::skip] //~ ERROR scoped attribute `rustfmt::skip` is experimental
let x =
3;
}

View file

@ -28,4 +28,15 @@ impl Bar for () {
//~^ Error method `bar` has incompatible signature for trait
}
// With non-local trait (#49841):
use std::hash::{Hash, Hasher};
struct X;
impl Hash for X {
fn hash(&self, hasher: &mut impl Hasher) {}
//~^ Error method `hash` has incompatible signature for trait
}
fn main() {}

View file

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

View file

@ -10,6 +10,8 @@
// ignore-tidy-linelength
//~^^^^^^^^^^^^ ERROR
#![feature(optin_builtin_traits)]
unsafe auto trait Trait {
@ -22,5 +24,4 @@ fn call_method<T: Trait>(x: T) {}
fn main() {
// ICE
call_method(());
//~^ ERROR
}

View file

@ -9,6 +9,6 @@
// except according to those terms.
fn main() {
#[inline] struct Foo; //~ ERROR attribute should be applied to function
#[inline] struct Foo; //~ ERROR attribute should be applied to function or closure
#[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct, enum or union
}

View file

@ -14,12 +14,12 @@ fn main() {
#[inline]
let _a = 4;
//~^^ ERROR attribute should be applied to function
//~^^ ERROR attribute should be applied to function or closure
#[inline(XYZ)]
let _b = 4;
//~^^ ERROR attribute should be applied to function
//~^^ ERROR attribute should be applied to function or closure
#[repr(nothing)]
let _x = 0;
@ -40,7 +40,7 @@ fn main() {
#[inline(ABC)]
foo();
//~^^ ERROR attribute should be applied to function
//~^^ ERROR attribute should be applied to function or closure
let _z = #[repr] 1;
//~^ ERROR attribute should not be applied to an expression

View file

@ -8,6 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// revisions: lexical nll
#![cfg_attr(nll, feature(nll))]
// Exercise the unused_mut attribute in some positive and negative cases
#![allow(unused_assignments)]
@ -18,15 +21,22 @@
fn main() {
// negative cases
let mut a = 3; //~ ERROR: variable does not need to be mutable
let mut a = 2; //~ ERROR: variable does not need to be mutable
let mut b = 3; //~ ERROR: variable does not need to be mutable
let mut a = vec![3]; //~ ERROR: variable does not need to be mutable
let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable
let mut a; //~ ERROR: variable does not need to be mutable
let mut a = 3; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut a = 2; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut b = 3; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut a = vec![3]; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let (mut a, b) = (1, 2); //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut a; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
a = 3;
let mut b; //~ ERROR: variable does not need to be mutable
let mut b; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
if true {
b = 3;
} else {
@ -34,37 +44,45 @@ fn main() {
}
match 30 {
mut x => {} //~ ERROR: variable does not need to be mutable
mut x => {} //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
}
match (30, 2) {
(mut x, 1) | //~ ERROR: variable does not need to be mutable
(mut x, 1) | //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
(mut x, 2) |
(mut x, 3) => {
}
_ => {}
}
let x = |mut y: isize| 10; //~ ERROR: variable does not need to be mutable
fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable
let x = |mut y: isize| 10; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
fn what(mut foo: isize) {} //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut a = &mut 5; //~ ERROR: variable does not need to be mutable
let mut a = &mut 5; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
*a = 4;
let mut a = 5;
let mut b = (&mut a,);
*b.0 = 4; //~^ ERROR: variable does not need to be mutable
let mut b = (&mut a,); //[lexical]~ ERROR: variable does not need to be mutable
*b.0 = 4; //[nll]~^ ERROR: variable does not need to be mutable
let mut x = &mut 1; //~ ERROR: variable does not need to be mutable
let mut x = &mut 1; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
let mut f = || {
*x += 1;
};
f();
fn mut_ref_arg(mut arg : &mut [u8]) -> &mut [u8] {
&mut arg[..] //~^ ERROR: variable does not need to be mutable
&mut arg[..] //[lexical]~^ ERROR: variable does not need to be mutable
//[nll]~^^ ERROR: variable does not need to be mutable
}
let mut v : &mut Vec<()> = &mut vec![]; //~ ERROR: variable does not need to be mutable
let mut v : &mut Vec<()> = &mut vec![]; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
v.push(());
// positive cases
@ -76,6 +94,12 @@ fn main() {
callback(|| {
a.push(3);
});
let mut a = Vec::new();
callback(|| {
callback(|| {
a.push(3);
});
});
let (mut a, b) = (1, 2);
a = 34;
@ -116,5 +140,6 @@ fn foo(mut a: isize) {
fn bar() {
#[allow(unused_mut)]
let mut a = 3;
let mut b = vec![2]; //~ ERROR: variable does not need to be mutable
let mut b = vec![2]; //[lexical]~ ERROR: variable does not need to be mutable
//[nll]~^ ERROR: variable does not need to be mutable
}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,15 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// aux-build:macro_reexport_1.rs
// Test for issue #50381: non-lifetime passed to :lifetime.
#![feature(macro_reexport)]
#![feature(macro_lifetime_matcher)]
#[macro_reexport(reexported)]
#[no_link]
extern crate macro_reexport_1;
macro_rules! m { ($x:lifetime) => { } }
fn main() {
assert_eq!(reexported!(), 3);
//~^ ERROR cannot find macro
m!(a);
//~^ ERROR expected a lifetime, found `a`
}

View file

@ -13,7 +13,6 @@
#![feature(asm)]
#![feature(trace_macros, concat_idents)]
#![feature(proc_macro_path_invoc)]
#[derive(Default)] //~ ERROR
enum OrDeriveThis {}

View file

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

View file

@ -0,0 +1,61 @@
// 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.
//revisions: ast mir
//[mir] compile-flags: -Z borrowck=mir
#![feature(rustc_attrs)]
// Here is arielb1's basic example from rust-lang/rust#27282
// that AST borrowck is flummoxed by:
fn should_reject_destructive_mutate_in_guard() {
match Some(&4) {
None => {},
ref mut foo if {
(|| { let bar = foo; bar.take() })();
//[mir]~^ ERROR cannot move out of borrowed content [E0507]
false } => { },
Some(s) => std::process::exit(*s),
}
}
// Here below is a case that needs to keep working: we only use the
// binding via immutable-borrow in the guard, and we mutate in the arm
// body.
fn allow_mutate_in_arm_body() {
match Some(&4) {
None => {},
ref mut foo if foo.is_some() && false => { foo.take(); () }
Some(s) => std::process::exit(*s),
}
}
// Here below is a case that needs to keep working: we only use the
// binding via immutable-borrow in the guard, and we move into the arm
// body.
fn allow_move_into_arm_body() {
match Some(&4) {
None => {},
mut foo if foo.is_some() && false => { foo.take(); () }
Some(s) => std::process::exit(*s),
}
}
// Since this is a compile-fail test that is explicitly encoding the
// different behavior of AST- vs MIR-borrowck where AST-borrowck does
// not error, we need to use rustc_error to placate the test harness
// that wants *some* error to occur.
#[rustc_error]
fn main() { //[ast]~ ERROR compilation successful
should_reject_destructive_mutate_in_guard();
allow_mutate_in_arm_body();
allow_move_into_arm_body();
}

View file

@ -0,0 +1,17 @@
// 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.
#![feature(nll)]
#![deny(unused_mut)]
fn main() {
vec![(42, 22)].iter().map(|(mut x, _y)| ()).count();
//~^ ERROR: variable does not need to be mutable
}

View file

@ -10,7 +10,6 @@
#![feature(decl_macro, associated_type_defaults)]
#![allow(unused, private_in_public)]
#![feature(proc_macro_path_invoc)]
mod priv_nominal {
pub struct Pub;

View file

@ -10,7 +10,6 @@
// ignore-tidy-linelength
#![feature(proc_macro_path_invoc)]
#![feature(decl_macro, associated_type_defaults)]
#![allow(unused, private_in_public)]

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(proc_macro_path_invoc)]
#![feature(decl_macro, associated_type_defaults)]
#![allow(unused, private_in_public)]

View file

@ -18,7 +18,6 @@
// error-pattern:type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct::{{constructor}}}` is priv
// error-pattern:type `for<'r> fn(&'r ext::Pub<u8>) {<ext::Pub<u8>>::priv_method}` is private
#![feature(proc_macro_path_invoc)]
#![feature(decl_macro)]
extern crate private_inferred_type as ext;

View file

@ -11,7 +11,6 @@
#![feature(associated_consts)]
#![feature(decl_macro)]
#![allow(private_in_public)]
#![feature(proc_macro_path_invoc)]
mod m {
fn priv_fn() {}

View file

@ -15,7 +15,10 @@ struct A(i32);
#[repr(align(15))] //~ ERROR: invalid `repr(align)` attribute: not a power of two
struct B(i32);
#[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2147483647
#[repr(align(4294967296))] //~ ERROR: invalid `repr(align)` attribute: larger than 2^29
struct C(i32);
#[repr(align(536870912))] // ok: this is the largest accepted alignment
struct D(i32);
fn main() {}

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(dyn_trait)]
#![allow(bare_trait_object)]
struct Foo;

View file

@ -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(tool_attributes)]
#![foo::bar] //~ ERROR an unknown tool name found in scoped attribute: `foo::bar`. [E0694]
#[foo::bar] //~ ERROR an unknown tool name found in scoped attribute: `foo::bar`. [E0694]
fn main() {}

View file

@ -0,0 +1,18 @@
// 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.
// Make sure that 'custom_attributes' feature does not allow scoped attributes.
#![feature(custom_attributes)]
#[foo::bar]
//~^ ERROR scoped attribute `foo::bar` is experimental (see issue #44690) [E0658]
//~^^ ERROR an unknown tool name found in scoped attribute: `foo::bar`. [E0694]
fn main() {}

View file

@ -0,0 +1,28 @@
// 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(used)]
#[used]
static FOO: u32 = 0; // OK
#[used] //~ ERROR attribute must be applied to a `static` variable
fn foo() {}
#[used] //~ ERROR attribute must be applied to a `static` variable
struct Foo {}
#[used] //~ ERROR attribute must be applied to a `static` variable
trait Bar {}
#[used] //~ ERROR attribute must be applied to a `static` variable
impl Bar for Foo {}
fn main() {}

View file

@ -54,17 +54,17 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2);
// _6 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb6, 1isize: bb4, otherwise: bb8];
// _7 = discriminant(_2);
// switchInt(move _7) -> [0isize: bb6, 1isize: bb4, otherwise: bb8];
// }
// bb1: {
// resume;
// }
// bb2: { // arm1
// StorageLive(_8);
// _8 = _4;
// _1 = (const 1i32, move _8);
// StorageDead(_8);
// StorageLive(_9);
// _9 = _4;
// _1 = (const 1i32, move _9);
// StorageDead(_9);
// goto -> bb13;
// }
// bb3: { // binding3(empty) and arm3
@ -87,24 +87,26 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1 and guard
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_7);
// _7 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = const guard() -> [return: bb10, unwind: bb1];
// }
// bb10: { // end of guard
// switchInt(move _7) -> [false: bb11, otherwise: bb2];
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _8) -> [false: bb11, otherwise: bb2];
// }
// bb11: { // to pre_binding2
// falseEdges -> [real: bb5, imaginary: bb5];
// }
// bb12: { // bindingNoLandingPads.before.mir2 and arm2
// StorageLive(_5);
// _5 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = _5;
// _1 = (const 2i32, move _9);
// StorageDead(_9);
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_10);
// _10 = _6;
// _1 = (const 2i32, move _10);
// StorageDead(_10);
// goto -> bb13;
// }
// bb13: {
@ -118,17 +120,17 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2);
// _6 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb5, 1isize: bb4, otherwise: bb8];
// _7 = discriminant(_2);
// switchInt(move _7) -> [0isize: bb5, 1isize: bb4, otherwise: bb8];
// }
// bb1: {
// resume;
// }
// bb2: { // arm1
// StorageLive(_8);
// _8 = _4;
// _1 = (const 1i32, move _8);
// StorageDead(_8);
// StorageLive(_9);
// _9 = _4;
// _1 = (const 1i32, move _9);
// StorageDead(_9);
// goto -> bb13;
// }
// bb3: { // binding3(empty) and arm3
@ -151,24 +153,26 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1 and guard
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_7);
// _7 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = const guard() -> [return: bb10, unwind: bb1];
// }
// bb10: { // end of guard
// switchInt(move _7) -> [false: bb11, otherwise: bb2];
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _8) -> [false: bb11, otherwise: bb2];
// }
// bb11: { // to pre_binding2
// falseEdges -> [real: bb6, imaginary: bb5];
// }
// bb12: { // binding2 and arm2
// StorageLive(_5);
// _5 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = _5;
// _1 = (const 2i32, move _9);
// StorageDead(_9);
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_10);
// _10 = _6;
// _1 = (const 2i32, move _10);
// StorageDead(_10);
// goto -> bb13;
// }
// bb13: {
@ -182,8 +186,8 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 1i32,);
// _3 = discriminant(_2);
// _8 = discriminant(_2);
// switchInt(move _8) -> [1isize: bb4, otherwise: bb5];
// _10 = discriminant(_2);
// switchInt(move _10) -> [1isize: bb4, otherwise: bb5];
// }
// bb1: {
// resume;
@ -213,41 +217,45 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1: Some(w) if guard()
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_11);
// _11 = const guard() -> [return: bb10, unwind: bb1];
// }
// bb10: { //end of guard
// switchInt(move _9) -> [false: bb11, otherwise: bb2];
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _11) -> [false: bb11, otherwise: bb2];
// }
// bb11: { // to pre_binding2
// falseEdges -> [real: bb5, imaginary: bb5];
// }
// bb12: { // binding2 & arm2
// StorageLive(_5);
// _5 = _2;
// StorageLive(_6);
// _6 = _2;
// _1 = const 2i32;
// goto -> bb17;
// }
// bb13: { // binding3: Some(y) if guard2(y)
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_11);
// StorageLive(_12);
// _12 = _6;
// _11 = const guard2(move _12) -> [return: bb14, unwind: bb1];
// StorageLive(_8);
// _8 = &((_2 as Some).0: i32);
// StorageLive(_13);
// StorageLive(_14);
// _14 = (*_8);
// _13 = const guard2(move _14) -> [return: bb14, unwind: bb1];
// }
// bb14: { // end of guard2
// StorageDead(_12);
// switchInt(move _11) -> [false: bb15, otherwise: bb3];
// StorageDead(_14);
// StorageLive(_7);
// _7 = ((_2 as Some).0: i32);
// switchInt(move _13) -> [false: bb15, otherwise: bb3];
// }
// bb15: { // to pre_binding4
// falseEdges -> [real: bb7, imaginary: bb7];
// }
// bb16: { // binding4 & arm4
// StorageLive(_7);
// _7 = _2;
// StorageLive(_9);
// _9 = _2;
// _1 = const 4i32;
// goto -> bb17;
// }

View file

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

View file

@ -0,0 +1,12 @@
-include ../tools.mk
all:
$(RUSTC) ep-lib.rs
$(RUSTC) ep-vec.rs
$(RUSTC) basic.rs --extern ep_lib=$(TMPDIR)/libep_lib.rlib
$(RUSTC) shadow-mod.rs --extern ep_lib=$(TMPDIR)/libep_lib.rlib
$(RUSTC) shadow-prelude.rs --extern Vec=$(TMPDIR)/libep_vec.rlib
$(RUSTC) feature-gate.rs --extern ep_lib=$(TMPDIR)/libep_lib.rlib 2>&1 | $(CGREP) "access to extern crates through prelude is experimental"
$(RUSTC) relative-only.rs --extern ep_lib=$(TMPDIR)/libep_lib.rlib 2>&1 | $(CGREP) "unresolved import"
$(RUSTC) relative-only.rs --extern ep_lib=$(TMPDIR)/libep_lib.rlib 2>&1 | $(CGREP) "failed to resolve"

View file

@ -1,4 +1,4 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-test not a test, auxiliary
#![feature(extern_prelude)]
#![feature(macro_reexport)]
#[macro_reexport(A)]
extern crate derive_a;
fn main() {
let s = ep_lib::S; // It works
s.external();
}

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "dylib"]
#[macro_export]
macro_rules! reexported {
() => ( 3 )
#![crate_type = "rlib"]
pub struct S;
impl S {
pub fn external(&self) {}
}

View file

@ -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 = "rlib"]
pub fn new(arg1: f32, arg2: ()) {}

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "dylib"]
#[macro_export]
macro_rules! reexported {
() => ( 3 )
fn main() {
let s = ep_lib::S; // Feature error
}

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,9 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![no_std]
#![feature(macro_reexport)]
// Extern prelude names are not available by absolute paths
#[allow(unused_extern_crates)]
#[macro_reexport="foo"] //~ ERROR bad macro re-export
extern crate std;
#![feature(extern_prelude)]
use ep_lib::S;
fn main() {
let s = ::ep_lib::S;
}

View file

@ -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.
// Local module shadows `ep_lib` from extern prelude
mod ep_lib {
pub struct S;
impl S {
pub fn internal(&self) {}
}
}
fn main() {
let s = ep_lib::S;
s.internal(); // OK
}

View file

@ -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.
// Extern prelude shadows standard library prelude
#![feature(extern_prelude)]
fn main() {
let x = Vec::new(0f32, ()); // OK
}

View file

@ -6,7 +6,7 @@ OUTPUT_FILE := $(TMPDIR)/libtest-json-output.json
all:
$(RUSTC) --test f.rs
$(call RUN,f) -Z unstable-options --test-threads=1 --format=json > $(OUTPUT_FILE) || true
RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=json > $(OUTPUT_FILE) || true
cat $(OUTPUT_FILE) | "$(PYTHON)" validate_json.py

View file

@ -112,7 +112,7 @@ fn expand_duplicate(cx: &mut ExtCtxt,
let copy_name = match mi.node {
ast::MetaItemKind::List(ref xs) => {
if let Some(word) = xs[0].word() {
word.ident
word.ident.segments.last().unwrap().ident
} else {
cx.span_err(mi.span, "Expected word");
return;

View file

@ -13,7 +13,7 @@
// aux-build:hello_macro.rs
// ignore-stage1
#![feature(proc_macro, proc_macro_path_invoc, proc_macro_non_items)]
#![feature(proc_macro, proc_macro_non_items)]
extern crate hello_macro;

View file

@ -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.
#![crate_type = "lib"]
#![crate_name = "issue48984aux"]
pub trait Foo { type Item; }
pub trait Bar: Foo<Item=[u8;1]> { }

View file

@ -1,16 +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.
#![crate_type = "dylib"]
#![feature(macro_reexport)]
#[macro_reexport(reexported)]
#[macro_use] #[no_link]
extern crate macro_reexport_1;

View file

@ -16,6 +16,7 @@
// "enable" to 0 instead.
// compile-flags:-g -Cllvm-args=-enable-tail-merge=0 -Cllvm-args=-opt-bisect-limit=0
// compile-flags:-Cforce-frame-pointers=yes
// ignore-pretty issue #37195
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported

View file

@ -0,0 +1,56 @@
// 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.
#![feature(nll)]
#![deny(unused_mut)]
#[derive(Debug)]
struct A {}
fn init_a() -> A {
A {}
}
#[derive(Debug)]
struct B<'a> {
ed: &'a mut A,
}
fn init_b<'a>(ed: &'a mut A) -> B<'a> {
B { ed }
}
#[derive(Debug)]
struct C<'a> {
pd: &'a mut B<'a>,
}
fn init_c<'a>(pd: &'a mut B<'a>) -> C<'a> {
C { pd }
}
#[derive(Debug)]
struct D<'a> {
sd: &'a mut C<'a>,
}
fn init_d<'a>(sd: &'a mut C<'a>) -> D<'a> {
D { sd }
}
fn main() {
let mut a = init_a();
let mut b = init_b(&mut a);
let mut c = init_c(&mut b);
let d = init_d(&mut c);
println!("{:?}", d)
}

View file

@ -10,8 +10,6 @@
// ignore-pretty `dyn ::foo` parses differently in the current edition
#![feature(dyn_trait)]
use std::fmt::Display;
static BYTE: u8 = 33;

View file

@ -0,0 +1,21 @@
// 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.
// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere
mod m {
pub struct LooksLikeExternCrate;
}
fn main() {
// OK, speculative resolution for `unused_qualifications` doesn't try
// to resolve this as an extern crate and load that crate
let s = m::LooksLikeExternCrate {};
}

View file

@ -10,7 +10,7 @@
// ignore-pretty pretty-printing is unhygienic
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
#![allow(unused)]
macro m($S:ident, $x:ident) {

View file

@ -10,7 +10,7 @@
// ignore-pretty pretty-printing is unhygienic
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
#![allow(unused)]
mod foo {

View file

@ -12,7 +12,7 @@
// aux-build:legacy_interaction.rs
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
#[allow(unused)]
extern crate legacy_interaction;

View file

@ -10,7 +10,7 @@
// ignore-pretty pretty-printing is unhygienic
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
mod bar {
mod baz {

View file

@ -13,7 +13,7 @@
// aux-build:my_crate.rs
// aux-build:unhygienic_example.rs
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
extern crate unhygienic_example;
extern crate my_crate; // (b)

View file

@ -12,7 +12,7 @@
// aux-build:xcrate.rs
#![feature(decl_macro, proc_macro_path_invoc)]
#![feature(decl_macro)]
extern crate xcrate;

View file

@ -0,0 +1,21 @@
// 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.
#![feature(nll)]
struct WithDrop;
impl Drop for WithDrop {
fn drop(&mut self) {}
}
fn consume(x: (&mut (), WithDrop)) -> &mut () { x.0 }
fn main() {}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "dylib"]
#![feature(macro_reexport)]
// aux-build:issue-48984-aux.rs
extern crate issue48984aux;
use issue48984aux::Bar;
#[macro_reexport(reexported)]
#[no_link]
extern crate macro_reexport_1;
fn do_thing<T: Bar>() { }
fn main() { }

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![no_std]
#![feature(macro_reexport)]
#![feature(stmt_expr_attributes)]
#[allow(unused_extern_crates)]
#[macro_reexport(foo="bar")] //~ ERROR bad macro re-export
extern crate std;
pub fn main() {
let _x = #[inline(always)] || {};
let _y = #[inline(never)] || {};
let _z = #[inline] || {};
}

View file

@ -8,14 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test that macro re-exports item are gated by `macro_reexport` feature gate.
// Regression test for #49685: drop elaboration was not revealing the
// value of `impl Trait` returns, leading to an ICE.
// aux-build:macro_reexport_1.rs
// gate-test-macro_reexport
fn main() {
let _ = Some(())
.into_iter()
.flat_map(|_| Some(()).into_iter().flat_map(func));
}
#![crate_type = "dylib"]
#[macro_reexport(reexported)]
//~^ ERROR macros re-exports are experimental and possibly buggy
#[macro_use] #[no_link]
extern crate macro_reexport_1;
fn func(_: ()) -> impl Iterator<Item = ()> {
Some(()).into_iter().flat_map(|_| vec![])
}

View 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.
fn main() {
// -------- Simplified test case --------
let _ = || 0..=1;
// -------- Original test case --------
let full_length = 1024;
let range = {
// do some stuff, omit here
None
};
let range = range.map(|(s, t)| s..=t).unwrap_or(0..=(full_length-1));
assert_eq!(range, 0..=1023);
}

View file

@ -0,0 +1,24 @@
// 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.
#![feature(nll)]
struct WithDrop;
impl Drop for WithDrop {
fn drop(&mut self) {}
}
fn reborrow_from_closure(r: &mut ()) -> &mut () {
let d = WithDrop;
(move || { d; &mut *r })()
}
fn main() {}

View file

@ -0,0 +1,25 @@
// 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.
#![feature(nll)]
#![feature(generators, generator_trait)]
struct WithDrop;
impl Drop for WithDrop {
fn drop(&mut self) {}
}
fn reborrow_from_generator(r: &mut ()) {
let d = WithDrop;
move || { d; yield; &mut *r };
}
fn main() {}

View file

@ -0,0 +1,17 @@
// 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.
#![feature(nll)]
#![deny(unused_mut)]
fn main() {
vec![42].iter().map(|_| ()).count();
vec![(42, 22)].iter().map(|(_x, _y)| ()).count();
}

View file

@ -10,7 +10,7 @@
// aux-build:two_macros.rs
#![feature(use_extern_macros, proc_macro_path_invoc)]
#![feature(use_extern_macros)]
extern crate two_macros;

View file

@ -0,0 +1,55 @@
// 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-flags: -O
#![allow(dead_code)]
#[repr(C, u8)]
enum ReprCu8 {
A(u16),
B,
}
#[repr(u8)]
enum Repru8 {
A(u16),
B,
}
#[repr(C)]
struct ReprC {
tag: u8,
padding: u8,
payload: u16,
}
fn main() {
// Test `repr(C, u8)`.
let r1 = ReprC { tag: 0, padding: 0, payload: 0 };
let r2 = ReprC { tag: 0, padding: 1, payload: 1 };
let t1: &ReprCu8 = unsafe { std::mem::transmute(&r1) };
let t2: &ReprCu8 = unsafe { std::mem::transmute(&r2) };
match (t1, t2) {
(ReprCu8::A(_), ReprCu8::A(_)) => (),
_ => assert!(false)
};
// Test `repr(u8)`.
let t1: &Repru8 = unsafe { std::mem::transmute(&r1) };
let t2: &Repru8 = unsafe { std::mem::transmute(&r2) };
match (t1, t2) {
(Repru8::A(_), Repru8::A(_)) => (),
_ => assert!(false)
};
}

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(dyn_trait)]
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {

View file

@ -11,9 +11,7 @@
// ignore-cloudabi networking not available
// ignore-wasm32-bare networking not available
#![feature(lookup_host)]
use std::net::lookup_host;
use std::net::ToSocketAddrs;
fn is_sync<T>(_: T) where T: Sync {}
fn is_send<T>(_: T) where T: Send {}
@ -30,5 +28,5 @@ macro_rules! all_sync_send {
}
fn main() {
all_sync_send!(lookup_host("localhost").unwrap(), next);
all_sync_send!("localhost:80".to_socket_addrs().unwrap(), next);
}

View file

@ -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.
// Scoped attributes should not trigger an unused attributes lint.
#![feature(tool_attributes)]
#![deny(unused_attributes)]
fn main() {
#[rustfmt::skip]
foo ();
}
fn foo() {
assert!(true);
}

View file

@ -0,0 +1,17 @@
// 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.
// Test that Vec::new() can be used for constants
#![feature(const_vec_new)]
const MY_VEC: Vec<usize> = Vec::new();
pub fn main() {}

View file

@ -8,11 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-order
const QUERY = '+';
const EXPECTED = {
'others': [
{ 'path': 'std::ops::AddAssign', 'name': 'AddAssign' },
{ 'path': 'std::ops::Add', 'name': 'Add' },
{ 'path': 'std::ops', 'name': 'AddAssign' },
{ 'path': 'std::ops', 'name': 'Add' },
],
};

View file

@ -8,12 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-order
const QUERY = '[';
const EXPECTED = {
'others': [
{ 'path': 'std', 'name': 'slice' },
{ 'path': 'std::ops::IndexMut', 'name': 'IndexMut' },
{ 'path': 'std::ops::Index', 'name': 'Index' },
{ 'path': 'std::ops', 'name': 'IndexMut' },
{ 'path': 'std::ops', 'name': 'Index' },
],
};

View file

@ -13,8 +13,8 @@ const QUERY = 'String';
const EXPECTED = {
'others': [
{ 'path': 'std::string', 'name': 'String' },
{ 'path': 'std::ffi', 'name': 'OsString' },
{ 'path': 'std::ffi', 'name': 'CString' },
{ 'path': 'std::ffi', 'name': 'OsString' },
],
'in_args': [
{ 'path': 'std::str', 'name': 'eq' },

View file

@ -0,0 +1,32 @@
// 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(extern_types)]
pub mod foo_mod {}
extern "C" {
pub fn foo_ffn();
pub static FOO_FSTATIC: FooStruct;
pub type FooFType;
}
pub fn foo_fn() {}
pub trait FooTrait {}
pub struct FooStruct;
pub enum FooEnum {}
pub union FooUnion {
x: (),
}
pub type FooType = FooStruct;
pub static FOO_STATIC: FooStruct = FooStruct;
pub const FOO_CONSTANT: FooStruct = FooStruct;
#[macro_export]
macro_rules! foo_macro {
() => ();
}

View file

@ -0,0 +1,71 @@
// 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.
// aux-build:all-item-types.rs
// build-aux-docs
#![feature(use_extern_macros)]
#![crate_name = "foo"]
#[macro_use]
extern crate all_item_types;
// @has 'foo/index.html' '//a[@href="../all_item_types/foo_mod/index.html"]' 'foo_mod'
#[doc(no_inline)]
pub use all_item_types::foo_mod;
// @has 'foo/index.html' '//a[@href="../all_item_types/fn.foo_ffn.html"]' 'foo_ffn'
#[doc(no_inline)]
pub use all_item_types::foo_ffn;
// @has 'foo/index.html' '//a[@href="../all_item_types/static.FOO_FSTATIC.html"]' 'FOO_FSTATIC'
#[doc(no_inline)]
pub use all_item_types::FOO_FSTATIC;
// @has 'foo/index.html' '//a[@href="../all_item_types/foreigntype.FooFType.html"]' 'FooFType'
#[doc(no_inline)]
pub use all_item_types::FooFType;
// @has 'foo/index.html' '//a[@href="../all_item_types/fn.foo_fn.html"]' 'foo_fn'
#[doc(no_inline)]
pub use all_item_types::foo_fn;
// @has 'foo/index.html' '//a[@href="../all_item_types/trait.FooTrait.html"]' 'FooTrait'
#[doc(no_inline)]
pub use all_item_types::FooTrait;
// @has 'foo/index.html' '//a[@href="../all_item_types/struct.FooStruct.html"]' 'FooStruct'
#[doc(no_inline)]
pub use all_item_types::FooStruct;
// @has 'foo/index.html' '//a[@href="../all_item_types/enum.FooEnum.html"]' 'FooEnum'
#[doc(no_inline)]
pub use all_item_types::FooEnum;
// @has 'foo/index.html' '//a[@href="../all_item_types/union.FooUnion.html"]' 'FooUnion'
#[doc(no_inline)]
pub use all_item_types::FooUnion;
// @has 'foo/index.html' '//a[@href="../all_item_types/type.FooType.html"]' 'FooType'
#[doc(no_inline)]
pub use all_item_types::FooType;
// @has 'foo/index.html' '//a[@href="../all_item_types/static.FOO_STATIC.html"]' 'FOO_STATIC'
#[doc(no_inline)]
pub use all_item_types::FOO_STATIC;
// @has 'foo/index.html' '//a[@href="../all_item_types/constant.FOO_CONSTANT.html"]' 'FOO_CONSTANT'
#[doc(no_inline)]
pub use all_item_types::FOO_CONSTANT;
// @has 'foo/index.html' '//a[@href="../foo/macro.foo_macro.html"]' 'foo_macro'
#[doc(no_inline)]
pub use all_item_types::foo_macro;

View file

@ -10,14 +10,11 @@
// aux-build:pub-use-extern-macros.rs
#![feature(use_extern_macros, macro_reexport)]
#![feature(use_extern_macros)]
// @has pub_use_extern_macros/macro.foo.html
// @!has pub_use_extern_macros/index.html 'pub use macros::foo;'
#[macro_reexport(foo)] extern crate macros;
extern crate macros;
// @has pub_use_extern_macros/index.html 'pub use macros::bar;'
// @!has pub_use_extern_macros/macro.bar.html
// @has pub_use_extern_macros/macro.bar.html
pub use macros::bar;
// @has pub_use_extern_macros/macro.baz.html
@ -25,7 +22,7 @@ pub use macros::bar;
#[doc(inline)]
pub use macros::baz;
// @!has pub_use_extern_macros/macro.quux.html
// @has pub_use_extern_macros/macro.quux.html
// @!has pub_use_extern_macros/index.html 'pub use macros::quux;'
#[doc(hidden)]
pub use macros::quux;

View file

@ -11,6 +11,8 @@
#![feature(universal_impl_trait)]
#![crate_name = "foo"]
use std::io::Read;
// @has foo/fn.foo.html
// @has - //pre 'foo('
// @matches - '_x: impl <a class="trait" href="[^"]+/trait\.Clone\.html"'
@ -39,6 +41,11 @@ impl<T> S<T> {
// @matches - '_baz:.+struct\.S\.html.+impl .+trait\.Clone\.html'
pub fn baz(_baz: S<impl Clone>) {
}
// @has - 'qux</a>('
// @matches - 'trait\.Read\.html'
pub fn qux(_qux: impl IntoIterator<Item = S<impl Read>>) {
}
}
// @has - 'method</a>('

View file

@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,12 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// aux-build:macro_reexport_1.rs
// aux-build:macro_reexport_2.rs
// Point at the captured immutable outer variable
#[macro_use] #[no_link]
extern crate macro_reexport_2;
fn foo(mut f: Box<FnMut()>) {
f();
}
fn main() {
assert_eq!(reexported!(), 3_usize);
let mut y = true;
foo(Box::new(move || y = false) as Box<_>);
}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,12 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// aux-build:macro_reexport_1.rs
// aux-build:macro_reexport_2_no_use.rs
// Point at the captured immutable outer variable
#[macro_use] #[no_link]
extern crate macro_reexport_2_no_use;
fn foo(mut f: Box<FnMut()>) {
f();
}
fn main() {
assert_eq!(reexported!(), 3_usize);
let y = true;
foo(Box::new(move || y = false) as Box<_>);
}

View file

@ -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.
// compile-flags:--crate-type lib

View file

@ -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.
// compile-flags:--crate-type lib

View file

@ -0,0 +1,12 @@
// 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-flags:--crate-type lib
fn foo() {}

View file

@ -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.
#[no_mangle] pub static RAH: usize = 5;
fn main() {}

View file

@ -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.
#[no_mangle] pub const RAH: usize = 5;
fn main() {}

View file

@ -0,0 +1,12 @@
// 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.
extern crate std as other_std;
fn main() {}

View file

@ -0,0 +1,12 @@
// 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.
extern crate std;
fn main() {}

View file

@ -8,15 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --cap-lints allow
#![allow(unused)]
// This tests that the fn_must_use feature-gate warning respects the lint
// cap. (See discussion in Issue #44213.)
fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
and_yet + 1
}
#![feature(rustc_attrs)]
#[must_use] // (no feature-gate warning because of the lint cap!)
fn need_to_use_it() -> bool { true }
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {
let behold: isize = 2;
let with_tears: usize = 3;
light_flows_our_war_of_mocking_words(&(behold as usize));
light_flows_our_war_of_mocking_words(&(with_tears + 4));
}

View file

@ -0,0 +1,22 @@
// 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.
#![allow(unused)]
fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
and_yet + 1
}
fn main() {
let behold: isize = 2;
let with_tears: usize = 3;
light_flows_our_war_of_mocking_words(behold as usize);
light_flows_our_war_of_mocking_words(with_tears + 4);
}

View file

@ -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.
fn main() {}

View file

@ -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.
fn main() {}

View file

@ -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.
fn main() {}

View file

@ -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.
fn main() {
match &Some(3) {
&None => 1,
&Some(2) => { 3 }
_ => 2
};
}

View file

@ -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.
fn main() {
match &Some(3) {
&None => 1
&Some(2) => { 3 }
_ => 2
};
}

View file

@ -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.
fn main() {
println!("●●");
}

View file

@ -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.
fn main() {
println!('');
}

View file

@ -0,0 +1,15 @@
// 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-flags: -Z parse-only
fn main () {
((1, (2, 3)).1).1;
}

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