mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #154038 - cyrgani:regiontests, r=Kivooeo
merge `regions-outlives-nominal-type-*` tests into one file This is easily done since each of the individual files was already wrapped in a `mod`. Also, this removes the unneeded `rustc_attrs` usage from the tests.
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod rev_variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: fn(&'a i32),
|
||||
}
|
||||
enum Bar<'a,'b> {
|
||||
V(&'a Foo<'b>)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: &'a i32,
|
||||
}
|
||||
enum Bar<'a,'b> {
|
||||
V(&'a Foo<'b>)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: fn(T)
|
||||
}
|
||||
enum Bar<'a,'b> {
|
||||
V(&'a Foo<&'b i32>)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: T
|
||||
}
|
||||
enum Bar<'a,'b> {
|
||||
V(&'a Foo<&'b i32>)
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod rev_variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: fn(&'a i32),
|
||||
}
|
||||
struct Bar<'a,'b> {
|
||||
f: &'a Foo<'b>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: &'a i32,
|
||||
}
|
||||
struct Bar<'a,'b> {
|
||||
f: &'a Foo<'b>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod rev_variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: fn(T)
|
||||
}
|
||||
struct Bar<'a,'b> {
|
||||
f: &'a Foo<&'b i32>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -1,20 +0,0 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: T
|
||||
}
|
||||
struct Bar<'a,'b> {
|
||||
f: &'a Foo<&'b i32>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
@@ -0,0 +1,80 @@
|
||||
// Test that a nominal type (like `Foo<'a>`) outlives `'b` if its
|
||||
// arguments (like `'a`) outlive `'b`.
|
||||
//
|
||||
// Rule OutlivesNominalType from RFC 1214.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
mod variant_enum_region {
|
||||
struct Foo<'a> {
|
||||
x: &'a i32,
|
||||
}
|
||||
enum Bar<'a, 'b> {
|
||||
V(&'a Foo<'b>),
|
||||
}
|
||||
}
|
||||
|
||||
mod rev_variant_enum_region {
|
||||
struct Foo<'a> {
|
||||
x: fn(&'a i32),
|
||||
}
|
||||
enum Bar<'a, 'b> {
|
||||
V(&'a Foo<'b>),
|
||||
}
|
||||
}
|
||||
|
||||
mod variant_enum_type {
|
||||
struct Foo<T> {
|
||||
x: T,
|
||||
}
|
||||
enum Bar<'a, 'b> {
|
||||
V(&'a Foo<&'b i32>),
|
||||
}
|
||||
}
|
||||
|
||||
mod rev_variant_enum_type {
|
||||
struct Foo<T> {
|
||||
x: fn(T),
|
||||
}
|
||||
enum Bar<'a, 'b> {
|
||||
V(&'a Foo<&'b i32>),
|
||||
}
|
||||
}
|
||||
|
||||
mod variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: &'a i32,
|
||||
}
|
||||
struct Bar<'a, 'b> {
|
||||
f: &'a Foo<'b>,
|
||||
}
|
||||
}
|
||||
|
||||
mod rev_variant_struct_region {
|
||||
struct Foo<'a> {
|
||||
x: fn(&'a i32),
|
||||
}
|
||||
struct Bar<'a, 'b> {
|
||||
f: &'a Foo<'b>,
|
||||
}
|
||||
}
|
||||
|
||||
mod variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: T,
|
||||
}
|
||||
struct Bar<'a, 'b> {
|
||||
f: &'a Foo<&'b i32>,
|
||||
}
|
||||
}
|
||||
|
||||
mod rev_variant_struct_type {
|
||||
struct Foo<T> {
|
||||
x: fn(T),
|
||||
}
|
||||
struct Bar<'a, 'b> {
|
||||
f: &'a Foo<&'b i32>,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user