Most were added mechanically.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(stable_features)]
#![feature(const_indexing)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Checks that mutable static items can have mutable slices
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
pub fn main() {
let x : &[isize] = &[1,2,3,4,5];
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test slicing sugar.
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![feature(slice_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Foo;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// aux-build:associated-types-cc-lib.rs
// Test that we are able to reference cross-crate traits that employ
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Check that we do not report ambiguities when equivalent predicates
// (modulo bound lifetime names) appears in the environment
// twice. Issue #21965.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Check that we do not report ambiguities when the same predicate
// appears in the environment twice. Issue #21965.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_imports)]
// Test how resolving a projection interacts with inference. In this
// case, we were eagerly unifying the type variable for the iterator
// type with `I` from the where clause, ignoring the in-scope `impl`
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Regression test for #21212: an overflow occurred during trait
// checking where normalizing `Self::Input` led to normalizing the
// where clauses in the environment which in turn required normalizing
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we can resolve nested projection types. Issue #20666.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we normalize associated types that appear in a bound that
// contains a binding. Issue #21664.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we normalize associated types that appear in bounds; if
// we didn't, the call to `self.split2()` fails to type check.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we correctly handle projection bounds appearing in the
// supertrait list (and in conjunction with overloaded operators). In
// this case, the `Result=Self` binding in the supertrait listing of
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
// Corrected regression test for #20831. The original did not compile.
// When fixed, it revealed another problem concerning projections that
// appear in associated type bindings in object types, which were not
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that we are handle to correctly handle a projection type
// that appears in a supertrait bound. Issue #20559.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test a where clause that uses a non-normalized projection type.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #20582. This test caused an ICE related to
// inconsistent region erasure in codegen.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
// Test paths to associated types using the type-parameter-only sugar.
use std::ops::Deref;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
// Test how resolving a projection interacts with inference. In this
// case, we were eagerly unifying the type variable for the iterator
// type with `I` from the where clause, ignoring the in-scope `impl`
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Foo {
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
#![allow(non_shorthand_field_patterns)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
enum color {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that we do not leak when the arg pattern must drop part of the
// argument (in this case, the `y` field).
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub fn main() {
let x = Some(3);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn foo(_: &[&str]) {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: -g
#[derive(PartialEq, Eq)]
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// n.b. This was only ever failing with optimization disabled.
fn a() -> isize { match return 1 { 2 => 3, _ => panic!() } }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// regression test for issue #5625
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E {
Foo{f : isize},
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
fn foo<T>(y: Option<T>) {
let mut x: isize;
let mut rs: Vec<isize> = Vec::new();
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct X { x: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
enum maybe<T> { nothing, just(T), }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
// pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
#![allow(unused_variables)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #53
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
#![allow(non_camel_case_types)]
#![allow(non_shorthand_field_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Foo { foo: bool, bar: Option<isize>, baz: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// a bug was causing this to complain about leaked memory on exit
// except according to those terms.
// run-pass
+#![allow(unused_unsafe)]
// ignore-pretty issue #37199
#![allow(while_true)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641)
// revisions: ast mir
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// Test that freezing an `&mut` pointer while referent is
// frozen is legal.
//
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(unconditional_recursion)]
// Check that we do not ICE when compiling this
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test case from #39963.
#![feature(nll)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-pretty issue #37199
fn match_ref(v: Option<isize>) -> isize {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for issue #7740
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// This test verifies that casting from the same lifetime on a value
// to the same lifetime on a trait succeeds. See issue #10766.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum Foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_variables)]
#![deny(non_snake_case)]
#![feature(stmt_expr_attributes)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(improper_ctypes)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
use std::rc::Rc;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn negate(x: &isize) -> isize {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn sum(x: &[isize]) -> isize {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
use std::rc::Rc;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:coherence_lib.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
use std::fmt::Debug;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(optin_builtin_traits)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that we are able to introduce a negative constraint that
// `MyType: !MyTrait` along with other "fundamental" wrappers.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(deprecated)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// General test that function items in static blocks
// can be generated with a macro.
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
mod foo {
pub trait Value {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Make sure const bounds work on things, and test that a few types
// are const.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V, VV(isize) }
static C: E = E::V;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V, VV(isize) }
static C: E = E::V;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
enum A { A1, A2 }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V0, V1(isize) }
static C: &'static E = &E::V0;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V16(u16), V32(u32) }
struct S { a: E, b: u16, c: u16 }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V0, V16(u16) }
struct S { a: E, b: u16, c: u16 }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E {
S0 { s: String },
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V16(u16), V32(u32) }
static C: (E, u16, u16) = (E::V16(0xDEAD), 0x600D, 0xBAD);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V0, V16(u16) }
static C: (E, u16, u16) = (E::V0, 0x600D, 0xBAD);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V16(u16), V32(u32) }
struct S(E, u16, u16);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E { V0, V16(u16) }
struct S(E, u16, u16);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// check for const_err regressions
#![deny(const_err)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
const x : [isize; 4] = [1,2,3,4];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(min_const_fn)]
const fn add(x: usize, y: usize) -> usize {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test use of const fn from another crate without a feature gate.
// aux-build:const_fn_lib.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
const ARR: [usize; 1] = [2];
const ARR2: [i32; ARR[0]] = [5, 6];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Foo {
Bar,
// except according to those terms.
// run-pass
+#![allow(unreachable_patterns)]
#![feature(min_const_fn)]
#[derive(PartialEq, Eq)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![allow(overflowing_literals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
type Big = [u64; 8];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(min_const_fn)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
use std::{str, string};
const A: [u8; 2] = ['h' as u8, 'i' as u8];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_upper_case_globals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Issue #24644 - block causes a &Trait -> &Trait coercion:
trait Trait {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// A quick test of 'unsafe const fn' functionality
#![feature(min_const_fn)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:pub_static_array.rs
extern crate pub_static_array as array;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:xcrate-trait-lifetime-param.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
trait Nat {
const VALUE: usize;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(const_let)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(const_let)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// test that certain things are disallowed in constant functions
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_unsafe)]
// https://github.com/rust-lang/rust/issues/48279
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![feature(const_fn, const_let)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// https://github.com/rust-lang/rust/issues/46114
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
struct CustomAutoRooterVFTable {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// test for issue #30244
#[derive(Copy, Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#[derive(Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#[derive(Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
#![allow(deprecated)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
#![allow(deprecated)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::fmt;
#[derive(Debug)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug)]
struct Unit;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(PartialEq, Debug)]
enum Foo {
Bar,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(PartialEq, Debug)]
enum Foo {
Bar(isize, isize),
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Hash)]
enum Foo {
Bar(isize, char),
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#[derive(Hash)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(PartialEq, Debug)]
enum S {
X { x: isize, y: isize },
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(non_upper_case_globals)]
// Test that destructor on a struct runs successfully after the struct
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
// ignore-emscripten no threads support
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S<T> {
x: T
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Foo {
x: isize
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
enum Foo { }
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
// revisions:lexical nll
#![cfg_attr(nll, feature(nll))]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem::size_of;
struct Test<T> {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(stable_features)]
// Test a very simple custom DST coercion.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test coercions involving DST and/or raw pointers
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Foo<T: ?Sized> {
a: u16,
b: T
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that overloaded index expressions with DST result types
// work and don't ICE.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
extern fn f() {
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
#![feature(libc)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// This time we're testing repeatedly going up and down both stacks to
// make sure the stack pointers are maintained properly in both
// directions
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
extern "C" {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere
mod m {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that inherent impls can be defined for extern types.
#![feature(extern_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that pointers to extern types can be cast from/to usize,
// despite being !Sized.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that pointers and references to extern types are thin, ie they have the same size and
// alignment as a pointer to ().
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that traits can be implemented for extern types.
#![feature(extern_types)]
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// pretty-expanded FIXME #23616
fn int_id(x: isize) -> isize { return x; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum BogusOption<T> {
None,
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![feature(lang_items, start, alloc)]
#![no_std]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
#![feature(label_break_value)]
// Test control flow to follow label_break_value semantics
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
// pretty-expanded FIXME #23616
#![allow(unreachable_code)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
#![feature(never_type)]
#[allow(unused)]
// except according to those terms.
// run-pass
+#![allow(unused_parens)]
// pretty-expanded FIXME #23616
/* Make sure a loop{} can be the tailexpr in the body
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
#![allow(unused_variables)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-wasm32-bare no libc to test ffi with
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
fn with_closure<A, F>(_: F)
where F: FnOnce(Vec<A>, A)
{
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
struct UsizeRef<'a> {
a: &'a usize
}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Ensure that we deduce expected argument types when a `fn()` type is expected (#41755)
fn foo(f: fn(Vec<u32>) -> usize) { }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test explicit coercions from a fn item type to a fn pointer type.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test implicit coercions from a fn item type to a fn pointer type.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(stable_features)]
// Tests parallel codegen - this can fail if the symbol for the anonymous
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![feature(generators)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(generators)]
// except according to those terms.
// run-pass
+#![allow(unused_unsafe)]
#![feature(generators)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that a borrow that occurs after a yield in the same
// argument list is not treated as live across the yield by
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(dead_code)]
// revisions:lexical nll
//[nll]compile-flags: -Z disable-nll-user-type-assert
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
fn id<T>(x: T) -> T { return x; }
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
#![allow(non_camel_case_types)]
enum foo<T> { arm(T), }
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct Triple<T> { x: T, y: T, z: T }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that we handle binder levels in object types correctly.
// Initially, the reference to `'tcx` in the object type
// `&Typer<'tcx>` was getting an incorrect binder level, yielding
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Typer<'tcx> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
// Test that `F : Fn(isize) -> isize + Send` is interpreted as two
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// Test that `Fn(isize) -> isize + 'static` parses as `(Fn(isize) -> isize) +
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// A basic test of using a higher-ranked trait bound.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that `&PrinterSupport`, which is really short for `&'a
// PrinterSupport<'b>`, gets properly expanded when it appears in a
// closure type. This used to result in messed up De Bruijn indices.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test what happens when a HR obligation is applied to an impl with
// "outlives" bounds. Currently we're pretty conservative here; this
// will probably improve in time.
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
mod x {
pub fn g() -> usize {14}
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
+
// Test that labels injected by macros do not break hygiene. This
// checks cases where the macros invocations are under the rhs of a
// let statement.
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:23:9
+ --> $DIR/hygienic-labels-in-let.rs:25:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:55:9
+ --> $DIR/hygienic-labels-in-let.rs:57:9
|
LL | 'x: loop {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:55:9
+ --> $DIR/hygienic-labels-in-let.rs:57:9
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:23:9
+ --> $DIR/hygienic-labels-in-let.rs:25:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:23:9
+ --> $DIR/hygienic-labels-in-let.rs:25:9
|
LL | 'x: loop { $e }
| ^^
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:23:9
+ --> $DIR/hygienic-labels-in-let.rs:25:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:65:9
+ --> $DIR/hygienic-labels-in-let.rs:67:9
|
LL | 'x: loop {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:65:9
+ --> $DIR/hygienic-labels-in-let.rs:67:9
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:65:9
+ --> $DIR/hygienic-labels-in-let.rs:67:9
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:65:9
+ --> $DIR/hygienic-labels-in-let.rs:67:9
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:30:9
+ --> $DIR/hygienic-labels-in-let.rs:32:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ---------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:30:9
+ --> $DIR/hygienic-labels-in-let.rs:32:9
|
LL | 'x: loop { $e }
| -- first declared here
| ---------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:30:9
+ --> $DIR/hygienic-labels-in-let.rs:32:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ---------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:30:9
+ --> $DIR/hygienic-labels-in-let.rs:32:9
|
LL | 'x: loop { $e }
| -- first declared here
| ---------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:30:9
+ --> $DIR/hygienic-labels-in-let.rs:32:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ---------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: loop {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:75:9
+ --> $DIR/hygienic-labels-in-let.rs:77:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: loop { $e }
| -- first declared here
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: loop { $e }
| -- first declared here
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| -- first declared here
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels-in-let.rs:37:9
+ --> $DIR/hygienic-labels-in-let.rs:39:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// Test that labels injected by macros do not break hygiene.
// Issue #24278: The label/lifetime shadowing checker from #24162
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:21:9
+ --> $DIR/hygienic-labels.rs:22:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:46:5
+ --> $DIR/hygienic-labels.rs:47:5
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:46:5
+ --> $DIR/hygienic-labels.rs:47:5
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:21:9
+ --> $DIR/hygienic-labels.rs:22:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:21:9
+ --> $DIR/hygienic-labels.rs:22:9
|
LL | 'x: loop { $e }
| ^^
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:21:9
+ --> $DIR/hygienic-labels.rs:22:9
|
LL | 'x: loop { $e }
| ^^ lifetime 'x already in scope
| ------------------ in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:52:5
+ --> $DIR/hygienic-labels.rs:53:5
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:52:5
+ --> $DIR/hygienic-labels.rs:53:5
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:52:5
+ --> $DIR/hygienic-labels.rs:53:5
|
LL | 'x: loop {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:52:5
+ --> $DIR/hygienic-labels.rs:53:5
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:35:9
+ --> $DIR/hygienic-labels.rs:36:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:35:9
+ --> $DIR/hygienic-labels.rs:36:9
|
LL | 'x: loop { $e }
| -- first declared here
| ------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:35:9
+ --> $DIR/hygienic-labels.rs:36:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:35:9
+ --> $DIR/hygienic-labels.rs:36:9
|
LL | 'x: loop { $e }
| -- first declared here
| ------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:35:9
+ --> $DIR/hygienic-labels.rs:36:9
|
LL | 'x: while 1 + 1 == 2 { $e }
| ^^ lifetime 'x already in scope
| ------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: for _ in 0..1 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: loop {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: loop { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: while 1 + 1 == 2 {
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:57:5
+ --> $DIR/hygienic-labels.rs:58:5
|
LL | 'x: while 1 + 1 == 2 { $e }
| -- first declared here
| ^^ lifetime 'x already in scope
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: loop { $e }
| -- first declared here
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: loop { $e }
| -- first declared here
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
| ----------------------- in this macro invocation
warning: label name `'x` shadows a label name that is already in scope
- --> $DIR/hygienic-labels.rs:28:9
+ --> $DIR/hygienic-labels.rs:29:9
|
LL | 'x: for _ in 0..1 { $e }
| ^^ lifetime 'x already in scope
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
#![feature(decl_macro)]
pub macro create_struct($a:ident) {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-pretty pretty-printing is unhygienic
// aux-build:legacy_interaction.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn foo<T>(t: T) -> impl Into<[T; { const FOO: usize = 1; FOO }]> {
[t]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use module_of_many_things::*;
use dug::too::greedily::and::too::deep::*;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
// This should resolve fine. Prior to fix, the last import
// was being tried too early, and marked as unrsolved before
// the glob import had a chance to be resolved.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
mod a {
pub mod b {
pub mod c {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use foo::{x, y as fooy};
use Maybe::{Yes as MaybeYes};
// except according to those terms.
// run-pass
+#![allow(unused_unsafe)]
+#![allow(unreachable_code)]
// ignore-emscripten no threads support
#![allow(stable_features)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
unsafe extern fn foo() {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue-10028.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
enum StdioContainer {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
struct A { foo: isize }
struct B { a: isize, b: isize, c: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug)]
enum Foo<'s> {
V(&'s str)
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
extern "Rust" fn foo() {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct DroppableStruct;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub mod two_tuple {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: --cfg foo
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #1112
// Alignment of interior pointers to dynamic-size types
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// #11612
// We weren't updating the auto adjustments with all the resolved
// type information after type check.
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![allow(dead_code)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-pretty issue #37199
// Don't panic on blocks without results
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct A {
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// ignore-wasm32-bare no libc to test ffi with
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:issue_12612_1.rs
// aux-build:issue_12612_2.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub struct Foo;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
use std::collections::HashMap;
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// Test that when instantiating trait default methods, typeck handles
// lifetime parameters defined on the method bound correctly.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// defining static with struct that contains enum
// with &'static str variant used to cause ICE
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// ignore-cloudabi no processes
// ignore-emscripten no processes
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
struct Foo<'a> {
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
// This test may not always fail, but it can be flaky if the race it used to
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:issue13507.rs
extern crate issue13507;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod u8 {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
struct Foo<'a> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct TestStruct {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
const JSVAL_TAG_CLEAR: u32 = 0xFFFFFF80;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
#[macro_use] extern crate std as std2;
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// ignore-cloudabi no processes
// ignore-emscripten no processes
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_snake_case)]
#![allow(unused_variables)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
trait SomeTrait {}
struct Meow;
impl SomeTrait for Meow {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum X {
Foo(usize),
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Matcher {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
enum Two { A, B}
impl Drop for Two {
fn drop(&mut self) {
// except according to those terms.
// run-pass
+#![allow(path_statements)]
// pretty-expanded FIXME #23616
macro_rules! inner {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
// ignore-windows
// ignore-wasm32-bare no libs to link
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#[derive(Clone)]
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct A<'a> {
a: &'a i32,
b: &'a i32,
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
#![feature(box_syntax)]
#[derive(PartialEq, Debug)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum NestedEnum {
First,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Empty;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait MatrixRow { fn dummy(&self) { }}
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// compile-flags:--test
mod tests {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
+#![allow(unused_assignments)]
#[derive(Debug)]
enum Foo {
Bar(u32, u32),
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Parser<'a, I, O> {
parse: Box<FnMut(I) -> Result<O, String> + 'a>
}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// `#[cfg]` on struct field permits empty unusable struct
struct S {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
static X2: u64 = !0 as u16 as u64;
static Y2: u64 = !0 as u32 as u64;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::fs
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
struct Leak<'a> {
dropped: &'a mut bool
}
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
#[allow(dead_code)]
fn check(a: &str) {
let x = a as *const str;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S { a: usize }
static A: S = S { a: 3 };
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct A;
impl Drop for A {
fn drop(&mut self) {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
use std::marker;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue-17718-aux.rs
extern crate issue_17718_aux as other;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Person {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #17746
fn main() {}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(non_upper_case_globals)]
const count : usize = 2 as usize;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Aaa { fn dummy(&self) { } }
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::marker::PhantomData;
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that we can parse where clauses on various forms of tuple
// structs.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
// These crossed imports should resolve fine, and not block on
// each other and be reported as unresolved.
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// pretty-expanded FIXME #23616
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// Issue #1821 - Don't recurse trying to typecheck this
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that wrapping an unsized struct in an enum which gets optimised does
// not ICE.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that methods in trait impls should override default methods.
trait T {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Eq, PartialEq, PartialOrd, Ord)]
enum Test<'a> {
Int(&'a isize),
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub trait Borrow<Borrowed: ?Sized> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub trait Foo : Send { }
pub struct MyFoo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// check that we handle recursive arrays correctly in `type_of`
struct Loopy {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Str([u8]);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// regression test for #19097
struct Foo<T>(T);
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![deny(unused_qualifications)]
use self::A::B;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
fn foo<T, F: FnOnce(T) -> T>(f: F) {}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
trait Trait<Input> {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// aux-build:issue-19340-1.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
enum Homura {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
use std::any::TypeId;
use std::rc::Rc;
// except according to those terms.
// run-pass
+#![allow(path_statements)]
+#![allow(unused_variables)]
// Regression test for issue #19499. Due to incorrect caching of trait
// results for closures with upvars whose types were not fully
// computed, this rather bizarre little program (along with many more
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait PoolManager {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait PoolManager {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that `<Type as Trait>::Output` and `Self::Output` are accepted as type annotations in let
// bindings
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
struct Foo;
impl Foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(link_llvm_intrinsics)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Regression test for Issue #20343.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue_20389.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Trait {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
use std::thread;
fn _foo() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
type MyType<'a, T> = &'a T;
// combine lifetime bounds and type arguments in usual way
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// test that autoderef of a type like this does not
// cause compiler to loop. Note that no instances
// of such a type could ever be constructed.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
#![allow(stable_features)]
// A reduced version of the rustbook ice. The problem this encountered
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait T0 {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait T0 {
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
fn main() {
let mut shrinker: Box<Iterator<Item=i32>> = Box::new(vec![1].into_iter());
println!("{:?}", shrinker.next());
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
#![feature(box_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(core_intrinsics)]
struct NT(str);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
trait Trait<'a> {
type A;
type B;
// except according to those terms.
// run-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
// insufficient type propagation caused the type of the iterator to be
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#[derive(Hash)]
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// pretty-expanded FIXME #23616
use m::{START, END};
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// Issue #21486: Make sure that all structures are dropped, even when
// created via FRU and control-flow breaks in the middle of
// construction.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that the requirement (in `Bar`) that `T::Bar : 'static` does
// not wind up propagating to `T`.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
extern crate core;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
struct Index;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #21726: an issue arose around the rules for
// subtyping of projection types that resulted in an unconstrained
// region, yielding region inference failures.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
#![allow(non_upper_case_globals)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
pub fn main() {
let mut x = 0;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// This used to cause an ICE because the retslot for the "return" had the wrong type
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(type_alias_bounds)]
type Foo<T> where T: Copy = Box<T>;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Parsing patterns with paths with type parameters (issue #22544)
use std::default::Default;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::fs
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Test transitive analysis for associated types. Collected types
// should be normalized and new obligations generated.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::collections::HashMap;
use std::collections::hash_map::Entry::Vacant;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test transitive analysis for associated types. Collected types
// should be normalized and new obligations generated.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait Send {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// Testing that the B's are resolved
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Inner {
type T;
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::marker::PhantomData;
pub struct UnionedKeys<'a,K>
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Test for an ICE that occurred when a default method implementation
// was applied to a type that did not meet the prerequisites. The
// problem occurred specifically because normalizing
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![feature(box_syntax)]
struct Node<T: ?Sized>(T);
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
fn gimme_a_raw_pointer<T>(_: *const T) { }
fn test<T>(t: T) { }
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
use std::fmt;
use std::{i8, i16, i32, i64, isize};
use std::{u8, u16, u32, u64, usize};
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #24085. Errors were occurring in region
// inference due to the requirement that `'a:b'`, which was getting
// incorrectly codegened in connection with the closure below.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_variables)]
pub struct Registry<'a> {
listener: &'a mut (),
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Copy,Clone)]
struct Functions {
a: fn(u32) -> u32,
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
fn main() {
return ();
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
// compile-flags:--cfg set1
#![cfg_attr(set1, feature(custom_attribute))]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
use std::slice::Iter;
use std::io::{Error, ErrorKind, Result};
use std::vec::*;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Pair { f: isize, g: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
const x: &'static Fn() = &|| println!("ICE here");
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![feature(associated_type_defaults)]
use std::marker::PhantomData;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug)]
struct Row<T>([T]);
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// aux-build:issue-25467.rs
pub type Issue25467BarT = ();
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
struct Foo<'r>(&'r mut i32);
impl<'r> Drop for Foo<'r> {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
pub trait Parameters { type SelfRef; }
struct RP<'a> { _marker: std::marker::PhantomData<&'a ()> }
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+
fn main() {
macro_rules! f {
() => { 0 + 0 }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Tests that impls are allowed to have looser, more permissive bounds
// than the traits require.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::ops::{Deref, DerefMut};
struct Foo;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#[derive(Copy, Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn f() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
#![allow(non_snake_case)]
// ignore-pretty issue #37195
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
#![allow(non_snake_case)]
mod A {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub struct Foo {
x: isize,
y: isize
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[repr(packed)]
pub struct Good {
data: &'static u32,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_unsafe)]
+#![allow(unused_imports)]
#![allow(non_camel_case_types)]
pub type Task = isize;
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
use std::fmt;
struct NoisyDrop<T: fmt::Debug>(T);
impl<T: fmt::Debug> Drop for NoisyDrop<T> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
// Test that a field can have the same name in different variants
// of an enum
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Minimized version of issue-2804.rs. Both check that callee IDs don't
// clobber the previous node ID in a macro expr
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::rc::Rc;
fn test1() -> Rc<for<'a> Fn(&'a usize) + 'static> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(improper_ctypes)]
// ignore-wasm32-bare no libc to test ffi with
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(min_const_fn)]
fn main() {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug)]
struct Message<'a, P: 'a = &'a [u8]> {
header: &'a [u8],
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// This test ensures that each pointer type `P<X>` is covariant in `X`.
use std::rc::Rc;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
#![allow(non_camel_case_types)]
// Map representation
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn t1() -> u32 {
let x;
x = if true { [1, 2, 3] } else { [2, 3, 4] }[0];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
fn ret() -> u32 {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S([u8; { struct Z; 0 }]);
fn main() {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
macro_rules! m(
($e1:expr => $e2:expr) => ({ $e1 })
);
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
// aux-build:issue-29485.rs
// ignore-emscripten no threads
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// check that we don't accidentally capture upvars just because their name
// occurs in a path
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #29740. Inefficient MIR matching algorithms
// generated way too much code for this sort of case, leading to OOM.
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(min_const_fn)]
struct A {
field: usize,
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// More thorough regression test for Issues #30018 and #30822. This
// attempts to explore different ways that array element construction
// (for both scratch arrays and non-scratch ones) interacts with
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
#![deny(unused_variables)]
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
type Connection = Box<FnMut(Vec<u8>) + 'static>;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub struct Struct<K: 'static> {
pub field: K,
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Make {
type Out;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Various scenarios in which `pub` is required in blocks
struct S;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Tests that binary operators allow subtyping on both the LHS and RHS,
// and as such do not introduce unnecessarily strict lifetime constraints.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
const A: [u32; 1] = [0];
fn test() {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::marker::PhantomData;
struct TheType<T> {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
pub fn main() {
let x = (0, 2);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
struct trie_node {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue 33903:
// Built-in indexing should be used even when the index is not
// trivially an integer
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// rustc --test ignores2.rs && ./ignores2
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// #34751 ICE: 'rustc' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)'
#[allow(dead_code)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
const C: *const u8 = &0;
fn foo(x: *const u8) {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// This test case exposes conditions where the encoding of a trait object type
// with projection predicates would differ between this crate and the upstream
// crate, because the predicates were encoded in different order within each
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #35546. Check that we are able to codegen
// this. Before we had problems because of the drop glue signature
// around dropping a trait object (specifically, when dropping the
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug)]
enum Token {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
trait Foo {
type bar;
fn bar();
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![allow(non_snake_case)]
// ASCII art shape renderer. Demonstrates traits, impls, operator overloading,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem;
struct Foo<T: ?Sized> {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::ops::Deref;
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait DeclarationParser {
type Declaration;
}
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
use std::thread;
use std::sync::mpsc::Sender;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(improper_ctypes)]
// Issue #3656
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub fn main() {
trait Text {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[derive(Debug, PartialEq)]
enum Bar {
A(i64),
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:lib.rs
// Regression test for #37291. The problem was that the starting
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(slice_patterns)]
fn check(list: &[u8]) {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo {
fn foo(&self);
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
type A = for<> fn();
type B = for<'a,> fn();
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Check that constant ADTs are codegened OK, part k of N.
enum Bar {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Check that drop elaboration clears the "master" discriminant
// drop flag even if it protects no fields.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub struct Foo;
macro_rules! reexport {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#[repr(u64)]
enum A {
A = 0u64,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum PureCounter { PureCounterVariant(usize) }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub fn main() {
enum State { BadChar, BadSyntax }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn f<T: ?for<'a> Sized>() {}
fn main() {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
macro_rules! expr { () => { () } }
enum A {}
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
fn main() {
println!("{}", { macro_rules! x { ($(t:tt)*) => {} } 33 });
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
use std::ops::Add;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue_3979_traits.rs
extern crate issue_3979_traits;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
trait Positioned {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unreachable_code)]
// Regression test for issue #39984.
//
// The key here is that the error type of the `Ok` call ought to be
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
fn main() {
if false { test(); }
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
macro_rules! m { () => { 0 } }
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
fn foo() {}
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
/*
# if b { x } else { y } requires identical types for x and y
*/
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
macro_rules! m {
($e:expr) => {
macro_rules! n { () => { $e } }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// check that we don't have linear stack usage with multiple calls to `push`
#![feature(test)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Regression test for #40951.
const FOO: [&'static str; 1] = ["foo"];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub fn main() {
let _id: &Mat2<f64> = &Matrix::identity(1.0);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum A {
A1,
A2,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Foo;
impl Foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Function<T, F> { t: T, f: F }
impl<T, R> Function<T, fn() -> R> { fn foo() { } }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// this used to cause exponential code-size blowup during LLVM passes.
#![feature(test)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #41849.
use std::ops::Mul;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for #41936. The coerce-unsized trait check in
// coherence was using subtyping, which triggered variance
// computation, which failed because it required type info for fields
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue_42007_s.rs
extern crate issue_42007_s;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue-4208-cc.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#[derive(Debug)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct Foo<T>(T);
struct IntoIter<T>(T);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(stable_features)]
#![feature(associated_consts)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// pretty-expanded FIXME #23616
use std::io;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Trait {
type Output;
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
trait VecN {
const DIM: usize;
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
struct A<T: ?Sized> { ptr: T }
fn foo<T>(x: &A<[T]>) {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait T {
type X;
const X: Self::X;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: -Z borrowck=compare
struct Foo(bool);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(never_type)]
#![feature(exhaustive_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn broken(v: &[u8], i: usize, j: usize) -> &[u8] { &v[i..j] }
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
// compile-flags: --edition 2018
#![feature(try_blocks)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![feature(unsize, coerce_unsized)]
#[repr(packed)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::ops::Add;
fn ref_add<T>(a: &T, b: &T) -> T
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: -Zmir-opt-level=1
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Ensures that destructors are run for expressions of the form "e;" where
// `e` is a type which requires a destructor.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// compile-flags: -C codegen-units=8 -O
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
fn id<'c, 'b>(f: &'c &'b Fn(&i32)) -> &'c &'b Fn(&'static i32) {
f
}
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
use {{}, {}};
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(nll)]
struct AtomicRefMut<'a> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(nll)]
struct WithDrop;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(nll)]
struct MyStruct<'a> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Tests that automatic coercions from &mut T to *mut T
// allow borrows of T to expire immediately - essentially, that
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
#![feature(nll)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// This should resolve fine.
// Prior to fix, the crossed imports between a and b
// would block on the glob import, itself never being resolved
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// This should resolve fine even with the circular imports as
// they are not `pub`.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// regression test for issue 4875
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// Test that we are able to reinitialize box with moved referent
#![feature(nll)]
static mut ORDER: [usize; 3] = [0, 0, 0];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue-48984-aux.rs
extern crate issue48984aux;
use issue48984aux::Bar;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![deny(non_shorthand_field_patterns)]
pub struct Value<A> { pub value: A }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Void {}
enum Foo {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
enum Foo {
Bar = (|x: i32| { }, 42).1,
}
// except according to those terms.
// run-pass
+#![allow(unreachable_code)]
#![feature(nll)]
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Check that merely having lifetime parameters is not
// enough for codegen to consider this as non-monomorphic,
// which led to various assertions and failures in turn.
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// This test checks for namespace pollution by private tests.
// Tests used to marked as public causing name conflicts with normal
// functions only in test builds.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:png2.rs
// compile-flags:--extern png2
// edition:2018
// except according to those terms.
// run-pass
+#![allow(dead_code)]
type FontTableTag = u32;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// edition:2018
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
const INVALID_ENUM : u32 = 0;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:issue-5521.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Enum {
Foo { foo: usize },
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
// pretty-expanded FIXME #23616
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
use std::default::Default;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn foo<T: ::std::cmp::PartialEq>(_t: T) { }
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
/*
# ICE when returning struct with reference to trait
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(improper_ctypes)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
extern {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub mod foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn f<T>() -> bool {
enum E<T> { V(T) }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum Either<T, U> { Left(T), Right(U) }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Foo {
Bar(isize),
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(improper_ctypes)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(box_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Ensures that destructors are run for expressions of the form "let _ = e;"
// where `e` is a type which requires a destructor.
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
// aux-build:iss.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
static x: &'static usize = &1;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
fn foo<T: 'static>(_: T) {}
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// pretty-expanded FIXME #23616
#![allow(unreachable_code)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait IDummy {
fn do_nothing(&self);
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub mod a {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Regression test for issue 7660
// rvalue lifetime too short when equivalent `match` works
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
/*
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// aux-build:issue-7899.rs
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
/*
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait A {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// aux-build:issue-8259.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E {
Foo{f: isize},
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum E {
Foo{f: isize, b: bool},
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub trait Writer {
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
#![feature(rustc_attrs)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_parens)]
// pretty-expanded FIXME #23616
fn f<T, F>(g: F) -> T where F: FnOnce() -> T { g() }
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
use std::default::Default;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// after fixing #9384 and implementing hygiene for match bindings,
// this now fails because the insertion of the 'y' into the match
// doesn't cause capture. Making this macro hygienic (as I've done)
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: -Z borrowck=compare
static mut DROP: isize = 0;
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
fn decode() -> String {
'outer: loop {
let mut ch_start: usize;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
// ignore-pretty unreported
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for issue 9243
#![allow(non_upper_case_globals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
static DATA:&'static [&'static str] = &["my string"];
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct A<'a> {
a: &'a [String],
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
// Tests for a previous bug that occurred due to an interaction
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
#![allow(deprecated)]
// ignore-emscripten no threads support
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod a {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
macro_rules! f {
(v: $x:expr) => ( println!("{}", $x) )
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(min_const_fn)]
const fn f() -> usize {
5
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// Regression test for type inference failure around shifting. In this
// case, the iteration yields an isize, but we hadn't run the full type
// propagation yet, and so we just saw a type variable, yielding an
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::io::Write;
use std::fmt;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Just testing that panic!() type checks in statement or expr
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// The logic for parsing Kleene operators in macros has a special case to disambiguate `?`.
// Specifically, `$(pat)?` is the ZeroOrOne operator whereas `$(pat)?+` or `$(pat)?*` are the
// ZeroOrMore and OneOrMore operators using `?` as a separator. These tests are intended to
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Ideally, any macro call with a trailing comma should behave
// identically to a call without the comma.
//
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
// Check the macro follow sets (see corresponding cfail test).
// FOLLOW(pat) = {FatArrow, Comma, Eq, Or, Ident(if), Ident(in)}
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
// Regression test for issue #25436: check that things which can be
// followed by any token also permit X* to come afterwards.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
macro_rules! foo {
($l:lifetime, $l2:lifetime) => {
fn f<$l: $l2, $l2>(arg: &$l str, arg2: &$l2 str) -> &$l str {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// compile-flags: --cfg foo
macro_rules! compiles_fine {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
macro_rules! foo {
() => {
struct Bar;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
#![allow(stable_features)]
// Test parsing binary operators after macro invocations.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:two_macros.rs
extern crate two_macros;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
macro_rules! Tuple {
{ $A:ty,$B:ty } => { ($A, $B) }
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum T {
A(isize),
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:use-macro-self.rs
#[macro_use]
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
#![allow(non_camel_case_types)]
// pp-exact - Make sure we print all the attributes
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(stable_features)]
// Test that we handle projection types which wind up important for
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
+#![allow(unused_imports)]
// Test that we don't trigger on the blanket impl for all `&'a T` but
// rather keep autoderefing and trigger on the underlying impl. To
// know not to stop at the blanket, we have to recursively evaluate
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// This code was creating an ICE in the MIR type checker. The reason
// is that we are reifying a reference to a function (`foo::<'x>`),
// which involves extracting its signature, but we were not
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn test1(x: i8) -> i32 {
match x {
1...10 => 0,
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
fn into_inner() -> [u64; 1024] {
let mut x = 10 + 20;
[x; 1024]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// This code produces a CFG with critical edges that, if we don't
// handle properly, will cause invalid codegen.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
static mut DROP: bool = false;
struct ConnWrap(Conn);
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(stable_features)]
// test that ordinary fat pointer operations work.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
fn foo((x, y): (i8, i8)) {
}
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
// ignore-pretty issue #37195
mod mod_dir_simple {
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![feature(box_syntax)]
#[derive(Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct X { x: isize, y: isize, z: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct X { x: isize, y: isize, z: isize }
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![feature(box_syntax)]
#[derive(Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct Triple {a: isize, b: isize, c: isize}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct Triple { a: isize, b: isize, c: isize }
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(path_statements)]
+#![allow(dead_code)]
#![feature(nll)]
// except according to those terms.
// run-pass
+#![allow(path_statements)]
+#![allow(dead_code)]
#![feature(nll)]
#![feature(generators, generator_trait)]
// except according to those terms.
// run-pass
+#![allow(unused_macros)]
// compile-flags: -C debug-assertions
//
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::ops::Deref;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(stable_features)]
#![feature(box_syntax, core)]
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609).
use std::ops::{Deref, DerefMut};
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that we choose Deref or DerefMut appropriately based on mutability of ref bindings (#15609).
fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-emscripten weird assertion?
#![feature(repr_packed)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(overflowing_literals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(stable_features)]
#![allow(unused_comparisons)]
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:48:14
+ --> $DIR/packed-struct-generic-size.rs:49:14
|
LL | check!(P1::<u8, u8>, 1, 3);
| ^^ try removing `::`
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:49:14
+ --> $DIR/packed-struct-generic-size.rs:50:14
|
LL | check!(P1::<u64, u16>, 1, 11);
| ^^ try removing `::`
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:51:14
+ --> $DIR/packed-struct-generic-size.rs:52:14
|
LL | check!(P2::<u8, u8>, 1, 3);
| ^^ try removing `::`
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:52:14
+ --> $DIR/packed-struct-generic-size.rs:53:14
|
LL | check!(P2::<u64, u16>, 2, 12);
| ^^ try removing `::`
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:54:15
+ --> $DIR/packed-struct-generic-size.rs:55:15
|
LL | check!(P4C::<u8, u8>, 1, 3);
| ^^ try removing `::`
warning: unnecessary path disambiguator
- --> $DIR/packed-struct-generic-size.rs:55:15
+ --> $DIR/packed-struct-generic-size.rs:56:15
|
LL | check!(P4C::<u16, u64>, 4, 12);
| ^^ try removing `::`
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem;
#[repr(packed)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(repr_packed)]
// except according to those terms.
// run-pass
-
+#![allow(unused_variables)]
// compile-flags:-C panic=abort
// aux-build:exit-success-if-unwind.rs
// no-prefer-dynamic
// except according to those terms.
// run-pass
-
+#![allow(unused_variables)]
// compile-flags:-C panic=abort
// no-prefer-dynamic
// ignore-cloudabi no processes
// except according to those terms.
// run-pass
-
+#![allow(unused_variables)]
// compile-flags:-C lto -C panic=abort
// no-prefer-dynamic
// ignore-cloudabi no processes
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// compile-flags:-C lto -C panic=unwind
// no-prefer-dynamic
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(stable_features)]
#![feature(std_panic)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// ignore-emscripten no threads support
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub mod test2 {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// ignore-cloudabi no processes
// ignore-emscripten no processes
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that the compiler considers the 'a bound declared in the
// trait. Issue #20890.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that the compiler considers the 'static bound declared in the
// trait. Issue #20890.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// A very limited test of the "bottom" region
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(stable_features)]
#![feature(issue_5723_bootstrap)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(stable_features)]
#![feature(issue_5723_bootstrap)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Test that we are able to compile calls to associated fns like
// `decode()` where the bound on the `Self` parameter references a
// lifetime parameter of the trait. This example indicates why trait
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that you can insert an explicit lifetime in explicit self.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #2263.
// Here, `f` is a function that takes a pointer `x` and a function
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
// Issue #2263.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that we recognize that if you have
//
// 'a : 'static
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
struct Point {x: isize, y: isize}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test an edge case in region inference: the lifetime of the borrow
// of `*x` must be extended to at least 'a.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Regression test for issue #22246 -- we should be able to deduce
// that `&'a B::Owned` implies that `B::Owned : 'a`.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// This test verifies that temporary lifetime is correctly computed
// for static objects in enclosing scopes.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test a corner case of LUB coercion. In this case, one arm of the
// match requires a deref coercion and the other doesn't, and there
// is an extra `&` on the `rc`. We want to be sure that the lifetime
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Issue #12856: a lifetime formal binding introduced by a generic fn
// should not upset the variance inference for actual occurrences of
// that lifetime in type expressions.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_parens)]
fn region_identity(x: &usize) -> &usize { x }
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
// Check that the type checker permits us to reassign `z` which
// started out with a longer lifetime and was reassigned to a shorter
// one (it should infer to be the intersection).
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
+#![allow(unused_variables)]
// Check that the type checker permits us to reassign `z` which
// started out with a longer lifetime and was reassigned to a shorter
// one (it should infer to be the intersection).
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that this fairly specialized, but also reasonable, pattern
// typechecks. The pattern involves regions bound in closures that
// wind up related to inference variables.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// This is an example where the older inference algorithm failed. The
// specifics of why it failed are somewhat, but not entirely, tailed
// to the algorithm. Ultimately the problem is that when computing the
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![allow(non_camel_case_types)]
enum int_wrapper<'a> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that a type which is contravariant with respect to its region
// parameter compiles successfully when used in a contravariant way.
//
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test that a type which is covariant with respect to its region
// parameter is successful when used in a covariant way.
//
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(libc)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-cloudabi stdout does not map to file descriptor 1 by default
// ignore-wasm32-bare no libc
// except according to those terms.
// run-pass
+#![allow(unreachable_patterns)]
#![feature(box_syntax, box_patterns)]
struct Foo{}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
fn some_or_wildcard(r: &Option<i32>, b: &i32) {
let _: &i32 = match r {
Some(a) => a,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
fn with_u8() {
let s = 5u8;
let r = match &s {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Foo {
Bar(Option<i8>, (), (), Vec<i32>),
Baz,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// aux-build:structs.rs
extern crate structs;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![feature(non_exhaustive)]
#[non_exhaustive]
// run-pass
#![feature(crate_in_paths)]
-
+#![allow(dead_code)]
use crate::m::f;
use crate as root;
// run-pass
#![feature(crate_in_paths)]
#![feature(crate_visibility_modifier)]
-
+#![allow(dead_code)]
mod m {
pub struct Z;
pub struct S1(crate (::m::Z)); // OK
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:xcrate.rs
// compile-flags:--extern xcrate
// edition:2018
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:xcrate.rs
// compile-flags:--extern xcrate
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(if_while_or_patterns)]
enum E {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that removed keywords are allowed as identifiers.
fn main () {
let offsetof = ();
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test to make sure that explicit self params work inside closures
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
#[derive(Copy, Clone)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// Check that a trait is still object-safe (and usable) if it has
// methods with by-value self so long as they require `Self : Sized`.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Check that a trait is still object-safe (and usable) if it has
// generic methods so long as they require `Self : Sized`.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that we can use `Self` types in impls in the expected way.
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
trait MyTrait {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-bitrig
// compile-flags: -C codegen-units=3
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-bitrig
// compile-flags: -C codegen-units=3
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// ignore-bitrig
// compile-flags: -C codegen-units=3
// ignore-emscripten no threads support
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten FIXME(#45351) hits an LLVM assert
#![feature(repr_simd, platform_intrinsics, concat_idents, test)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
// aux-build:go_trait.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(specialization)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+#![allow(unused_imports)]
// aux-build:go_trait.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(specialization)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![feature(specialization)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(specialization)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Deserializer {
fn read_int(&self) -> isize;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(box_syntax)]
#![feature(repr_packed)]
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
#![allow(non_camel_case_types)]
// pp-exact - Make sure we actually print the attributes
// except according to those terms.
// run-pass
+#![allow(unused_attributes)]
#![allow(non_camel_case_types)]
#![feature(custom_attribute)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
#![allow(non_camel_case_types)]
// ignore-freebsd FIXME fails on BSD
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
/* Test that exporting a class also exports its
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
use std::cmp;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// aux-build:cci_class_trait.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
struct cat {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
struct cat {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
struct cat {
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![allow(non_upper_case_globals)]
// Empty struct defined with braces add names into type namespace
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(deprecated)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
/*!
* C-like enums have to be represented as LLVM ints, not wrapped in a
// except according to those terms.
// run-pass
+#![allow(dead_code)]
enum Animal {
Cat = 0,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(overflowing_literals)]
use std::mem::size_of;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem::{size_of, align_of};
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod a {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_assignments)]
// pretty-expanded FIXME #23616
#![allow(unused_variables)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_upper_case_globals)]
// In theory, it doesn't matter what order destructors are run in for rust
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// Passing enums by value
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub use Foo::*;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod m2 {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum Foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
/*
// except according to those terms.
// run-pass
+#![allow(unused_unsafe)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
pub struct Fd(u32);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::mem::size_of;
enum E {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_unsafe)]
// Issue #2303
#![feature(intrinsics)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_unsafe)]
// ignore-wasm32-bare seems unimportant to test
// Issue #2303
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
enum opt<T> { none, some(T) }
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![allow(non_shorthand_field_patterns)]
// aux-build:xcrate_struct_aliases.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum Foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S { f0: String, f1: isize }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S {
f0: String,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
struct S<T, U = u16> {
a: T,
b: U,
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
mod foo {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(deprecated)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(deprecated)]
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(deprecated)]
use std::mem;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#[derive(Debug)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_parens)]
#![allow(non_camel_case_types)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
struct Foo(isize, isize, isize);
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
enum Foo {
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
use std::thread;
use std::sync::Mutex;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_mut)]
// pretty-expanded FIXME #23616
use std::sync::mpsc::{channel, Sender};
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(non_camel_case_types)]
// Test that a class with only sendable fields can be sent
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_mut)]
// ignore-windows
// exec-env:RUST_LOG=debug
// ignore-emscripten no threads support
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_mut)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// pretty-expanded FIXME #23616
// ignore-emscripten no threads support
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_mut)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// ignore-emscripten no threads support
use std::sync::mpsc::{channel, Sender};
// except according to those terms.
// run-pass
+#![allow(unused_parens)]
// ignore-emscripten no threads support
use std::sync::mpsc::{channel, Sender};
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_parens)]
#![allow(non_camel_case_types)]
use std::sync::mpsc::channel;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
use std::sync::mpsc::channel;
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_assignments)]
use std::sync::mpsc::channel;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
+#![allow(unused_assignments)]
// ignore-emscripten no threads support
use std::sync::mpsc::{channel, Sender};
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
use std::thread;
// except according to those terms.
// run-pass
+#![allow(unused_doc_comments)]
#![feature(optin_builtin_traits)]
auto trait Auto {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Test a case where a supertrait references a type that references
// the original trait. This poses no problem at the moment.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that when we match a trait reference like `Foo<A>: Foo<_#0t>`,
// we unify with `_#0t` with `A`. In this code, if we failed to do
// that, then you get an unconstrained type-variable in `call`.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Testing creating two vtables with the same self type, but different
// traits.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(overlapping_marker_traits)]
#![feature(optin_builtin_traits)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// There is some other borrowck bug, so we make the stuff not mut.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(optin_builtin_traits)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(unconditional_recursion)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// Tests that a heterogeneous list of existential types can be put inside an Arc
// and shared between threads as long as all types fulfill Send.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
trait U {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Trait<T> {
fn f(&self, x: T);
}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_mut)]
+#![allow(unused_variables)]
#![feature(box_syntax)]
use std::io::{self, Write};
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// "guessing" in trait selection can affect `copy_or_move`. Check that this
// is correctly handled. I am not sure what is the "correct" behaviour,
// but we should at least not ICE.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
trait A<T> {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// aux-build:trait_default_method_xc_aux.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// aux-build:trait_inheritance_auto_xc_aux.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Testing that this impl turns A into a Quux, because
// A is already a Foo Bar Baz
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo { fn f(&self) -> isize; }
trait Bar : Foo { fn g(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo { fn f(&self) -> isize; }
trait Bar : Foo { fn g(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Testing that we can cast to a subtrait and call subtrait
// methods. Not testing supertrait methods
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Testing that supertrait methods can be called on subtrait object types
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo { fn f(&self) -> isize; }
trait Bar : Foo { fn g(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// B and C both require A, so D does as well, twice, but that's just fine
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait A { fn a(&self) -> isize; }
trait B: A { fn b(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait A { fn a(&self) -> isize; }
trait B: A { fn b(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
pub trait NumExt: PartialEq + PartialOrd {}
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Extending Num and using inherited static methods
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
pub trait NumCast: Sized {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
use std::cmp::PartialEq;
trait MyNum : PartialEq { }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo { fn f(&self) -> isize; }
trait Bar : Foo { fn g(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
trait Foo { fn f(&self) -> isize; }
trait Bar { fn g(&self) -> isize; }
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
// Test that duplicate auto trait bounds in trait objects don't create new types.
#[allow(unused_assignments)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
mod base {
pub trait HasNew {
fn new() -> Self;
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// Test that when there is a conditional (but blanket) impl and a
// where clause, we don't get confused in trait resolution.
//
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// A model for how the `Fn` traits could work. You can implement at
// most one of `Go`, `GoMut`, or `GoOnce`, and then the others follow
// automatically.
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
// pretty-expanded FIXME #23616
#![allow(unused_variables)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Regression test for issue #22655: This test should not lead to
// infinite recursion.
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
#![feature(optin_builtin_traits)]
use std::marker::Send;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that you can supply `&F` where `F: FnMut()`.
#![feature(lang_items)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that you can supply `&F` where `F: Fn()`.
#![feature(lang_items)]
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// Test that the call operator autoderefs when calling a bounded type parameter.
use std::ops::FnMut;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// Test that we mutate a counter on the stack only when we expect to.
fn call<F>(f: F) where F : FnOnce() {
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// pretty-expanded FIXME #23616
fn main() {
// except according to those terms.
// run-pass
+#![allow(path_statements)]
+#![allow(dead_code)]
// A battery of tests to ensure destructors of unboxed closure environments
// run at the right times.
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_imports)]
use std::ops::FnMut;
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
// pretty-expanded FIXME #23616
fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![allow(non_camel_case_types)]
// edition:2018
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
#![allow(non_camel_case_types)]
// edition:2018
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![feature(untagged_unions)]
// except according to those terms.
// run-pass
+#![allow(path_statements)]
+#![allow(dead_code)]
macro_rules! union {
() => (struct S;)
// except according to those terms.
// run-pass
+#![allow(unused_imports)]
// aux-build:union.rs
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(unions_with_drop_fields)]
// Some traits can be derived for unions.
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
#![allow(unions_with_drop_fields)]
// Drop works for union itself.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
#![allow(unions_with_drop_fields)]
// Drop works for union itself.
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(unions_with_drop_fields)]
#![feature(untagged_unions)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
macro_rules! duplicate {
($i: item) => {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_snake_case)]
#![feature(untagged_unions)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(illegal_floating_point_literal_pattern)]
#[repr(u32)]
// except according to those terms.
// run-pass
+#![allow(unused_assignments)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![feature(box_syntax)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_allocation)]
#![feature(box_syntax)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #976
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #961
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![feature(box_syntax)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
#![feature(box_syntax)]
pub fn main() {
// except according to those terms.
// run-pass
+#![allow(dead_code)]
// Issue #5192
// pretty-expanded FIXME #23616
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_shorthand_field_patterns)]
// except according to those terms.
// run-pass
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(unused_must_use)]
// ignore-emscripten no threads support
#![feature(box_syntax)]
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
trait Foo<T> { fn dummy(&self, arg: T) { } }
// except according to those terms.
// run-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
struct A<'a, 'b> where 'a : 'b { x: &'a isize, y: &'b isize }
// except according to those terms.
// run-pass
+#![allow(unused_mut)]
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
fn foo<'a, I>(mut it: I) where I: Iterator<Item=&'a isize> {}
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
// pretty-expanded FIXME #23616
struct Bencher;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::collections::BinaryHeap;
use std::iter::Iterator;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
+#![allow(unused_imports)]
use std::cmp::{Ord, Ordering, PartialOrd};
use std::collections::BTreeMap;
use std::iter::Iterator;
// except according to those terms.
// run-pass
+#![allow(unused_variables)]
use std::iter::Iterator;
use std::vec::Vec;