summaryrefslogtreecommitdiffstats
path: root/src/test/ui-fulldeps/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui-fulldeps/auxiliary')
-rw-r--r--src/test/ui-fulldeps/auxiliary/empty-plugin.rs9
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-13560-1.rs3
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-13560-2.rs3
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-13560-3.rs6
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-16822.rs20
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-18502.rs21
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-24106.rs13
-rw-r--r--src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs59
-rw-r--r--src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs80
-rw-r--r--src/test/ui-fulldeps/auxiliary/lint-for-crate.rs45
-rw-r--r--src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs44
-rw-r--r--src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs33
-rw-r--r--src/test/ui-fulldeps/auxiliary/lint-tool-test.rs52
-rw-r--r--src/test/ui-fulldeps/auxiliary/lto-syntax-extension-lib.rs5
-rw-r--r--src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs11
-rw-r--r--src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs10
-rw-r--r--src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs10
-rw-r--r--src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs24
-rw-r--r--src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs12
-rw-r--r--src/test/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs7
20 files changed, 0 insertions, 467 deletions
diff --git a/src/test/ui-fulldeps/auxiliary/empty-plugin.rs b/src/test/ui-fulldeps/auxiliary/empty-plugin.rs
deleted file mode 100644
index c24cdc97a..000000000
--- a/src/test/ui-fulldeps/auxiliary/empty-plugin.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_driver;
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/issue-13560-1.rs b/src/test/ui-fulldeps/auxiliary/issue-13560-1.rs
deleted file mode 100644
index c3a2ae679..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-13560-1.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "dylib"]
diff --git a/src/test/ui-fulldeps/auxiliary/issue-13560-2.rs b/src/test/ui-fulldeps/auxiliary/issue-13560-2.rs
deleted file mode 100644
index 39c261e11..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-13560-2.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
diff --git a/src/test/ui-fulldeps/auxiliary/issue-13560-3.rs b/src/test/ui-fulldeps/auxiliary/issue-13560-3.rs
deleted file mode 100644
index e991bcc1a..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-13560-3.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-#[macro_use] #[no_link] extern crate issue_13560_1 as t1;
-#[macro_use] extern crate issue_13560_2 as t2;
diff --git a/src/test/ui-fulldeps/auxiliary/issue-16822.rs b/src/test/ui-fulldeps/auxiliary/issue-16822.rs
deleted file mode 100644
index 9042dd391..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-16822.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-#![crate_type="lib"]
-
-use std::cell::RefCell;
-
-pub struct Window<Data>{
- pub data: RefCell<Data>
-}
-
-impl<Data: Update> Window<Data> {
- pub fn update(&self, e: i32) {
- match e {
- 1 => self.data.borrow_mut().update(),
- _ => {}
- }
- }
-}
-
-pub trait Update {
- fn update(&mut self);
-}
diff --git a/src/test/ui-fulldeps/auxiliary/issue-18502.rs b/src/test/ui-fulldeps/auxiliary/issue-18502.rs
deleted file mode 100644
index 4d4230607..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-18502.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![crate_type="lib"]
-
-struct Foo;
-// This is the ICE trigger
-struct Formatter;
-
-trait Show {
- fn fmt(&self);
-}
-
-impl Show for Foo {
- fn fmt(&self) {}
-}
-
-fn bar<T>(f: extern "Rust" fn(&T), t: &T) { }
-
-// ICE requirement: this has to be marked as inline
-#[inline]
-pub fn baz() {
- bar(Show::fmt, &Foo);
-}
diff --git a/src/test/ui-fulldeps/auxiliary/issue-24106.rs b/src/test/ui-fulldeps/auxiliary/issue-24106.rs
deleted file mode 100644
index 2c6a60348..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-24106.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#![crate_type="lib"]
-
-enum E { E0 = 0, E1 = 1 }
-const E0_U8: u8 = E::E0 as u8;
-const E1_U8: u8 = E::E1 as u8;
-
-pub fn go<T>() {
- match 0 {
- E0_U8 => (),
- E1_U8 => (),
- _ => (),
- }
-}
diff --git a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs b/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
deleted file mode 100644
index c05443488..000000000
--- a/src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-#![feature(plugin, rustc_private)]
-#![crate_type = "dylib"]
-
-extern crate rustc_ast_pretty;
-extern crate rustc_driver;
-extern crate rustc_hir;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-extern crate rustc_ast;
-extern crate rustc_span;
-
-use rustc_ast_pretty::pprust;
-use rustc_driver::plugin::Registry;
-use rustc_hir as hir;
-use rustc_hir::intravisit;
-use rustc_hir::Node;
-use rustc_lint::{LateContext, LateLintPass, LintContext};
-use rustc_span::source_map;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[&MISSING_ALLOWED_ATTR]);
- reg.lint_store.register_late_pass(|_| Box::new(MissingAllowedAttrPass));
-}
-
-declare_lint! {
- MISSING_ALLOWED_ATTR,
- Deny,
- "Checks for missing `allowed_attr` attribute"
-}
-
-declare_lint_pass!(MissingAllowedAttrPass => [MISSING_ALLOWED_ATTR]);
-
-impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
- fn check_fn(
- &mut self,
- cx: &LateContext<'tcx>,
- _: intravisit::FnKind<'tcx>,
- _: &'tcx hir::FnDecl,
- _: &'tcx hir::Body,
- span: source_map::Span,
- id: hir::HirId,
- ) {
- let item = match cx.tcx.hir().get(id) {
- Node::Item(item) => item,
- _ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(id).def_id),
- };
-
- let allowed = |attr| pprust::attribute_to_string(attr).contains("allowed_attr");
- if !cx.tcx.hir().attrs(item.hir_id()).iter().any(allowed) {
- cx.lint(
- MISSING_ALLOWED_ATTR,
- "Missing 'allowed_attr' attribute",
- |lint| lint.set_span(span)
- );
- }
- }
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs b/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs
deleted file mode 100644
index a3b570ad8..000000000
--- a/src/test/ui-fulldeps/auxiliary/lint-for-crate-rpass.rs
+++ /dev/null
@@ -1,80 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_driver;
-extern crate rustc_hir;
-extern crate rustc_lint;
-extern crate rustc_span;
-#[macro_use]
-extern crate rustc_session;
-extern crate rustc_ast;
-
-use rustc_ast::attr;
-use rustc_driver::plugin::Registry;
-use rustc_lint::{LateContext, LateLintPass, LintContext, LintPass};
-use rustc_span::def_id::CRATE_DEF_ID;
-use rustc_span::symbol::Symbol;
-
-macro_rules! fake_lint_pass {
- ($struct:ident, $($attr:expr),*) => {
- struct $struct;
-
- impl LintPass for $struct {
- fn name(&self) -> &'static str {
- stringify!($struct)
- }
- }
-
- impl LateLintPass<'_> for $struct {
- fn check_crate(&mut self, cx: &LateContext) {
- let attrs = cx.tcx.hir().attrs(rustc_hir::CRATE_HIR_ID);
- let span = cx.tcx.def_span(CRATE_DEF_ID);
- $(
- if !cx.sess().contains_name(attrs, $attr) {
- cx.lint(CRATE_NOT_OKAY, |lint| {
- let msg = format!("crate is not marked with #![{}]", $attr);
- lint.build(&msg).set_span(span).emit();
- });
- }
- )*
- }
- }
-
- }
-}
-
-declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
-declare_lint!(CRATE_NOT_RED, Warn, "crate not marked with #![crate_red]");
-declare_lint!(CRATE_NOT_BLUE, Warn, "crate not marked with #![crate_blue]");
-declare_lint!(CRATE_NOT_GREY, Warn, "crate not marked with #![crate_grey]");
-declare_lint!(CRATE_NOT_GREEN, Warn, "crate not marked with #![crate_green]");
-
-fake_lint_pass! {
- PassOkay,
- Symbol::intern("crate_okay")
-}
-
-fake_lint_pass! {
- PassRedBlue,
- Symbol::intern("crate_red"), Symbol::intern("crate_blue")
-}
-
-fake_lint_pass! {
- PassGreyGreen,
- Symbol::intern("crate_grey"), Symbol::intern("crate_green")
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[
- &CRATE_NOT_OKAY,
- &CRATE_NOT_RED,
- &CRATE_NOT_BLUE,
- &CRATE_NOT_GREY,
- &CRATE_NOT_GREEN,
- ]);
- reg.lint_store.register_late_pass(|_| Box::new(PassOkay));
- reg.lint_store.register_late_pass(|_| Box::new(PassRedBlue));
- reg.lint_store.register_late_pass(|_| Box::new(PassGreyGreen));
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs b/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs
deleted file mode 100644
index 073da688c..000000000
--- a/src/test/ui-fulldeps/auxiliary/lint-for-crate.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_driver;
-extern crate rustc_hir;
-#[macro_use]
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-extern crate rustc_ast;
-extern crate rustc_span;
-
-use rustc_driver::plugin::Registry;
-use rustc_lint::{LateContext, LateLintPass, LintContext};
-use rustc_span::def_id::CRATE_DEF_ID;
-use rustc_span::symbol::Symbol;
-
-declare_lint! {
- CRATE_NOT_OKAY,
- Warn,
- "crate not marked with #![crate_okay]"
-}
-
-declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
-
-impl<'tcx> LateLintPass<'tcx> for Pass {
- fn check_crate(&mut self, cx: &LateContext) {
- let attrs = cx.tcx.hir().attrs(rustc_hir::CRATE_HIR_ID);
- let span = cx.tcx.def_span(CRATE_DEF_ID);
- if !cx.sess().contains_name(attrs, Symbol::intern("crate_okay")) {
- cx.lint(
- CRATE_NOT_OKAY,
- "crate is not marked with #![crate_okay]",
- |lint| lint.set_span(span)
- );
- }
- }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[&CRATE_NOT_OKAY]);
- reg.lint_store.register_late_pass(|_| Box::new(Pass));
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs
deleted file mode 100644
index 4a41e7fbb..000000000
--- a/src/test/ui-fulldeps/auxiliary/lint-group-plugin-test.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-// Load rustc as a plugin to get macros.
-extern crate rustc_driver;
-extern crate rustc_hir;
-#[macro_use]
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_driver::plugin::Registry;
-use rustc_lint::{LateContext, LateLintPass, LintArray, LintContext, LintId, LintPass};
-
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
-
-declare_lint_pass!(Pass => [TEST_LINT, PLEASE_LINT]);
-
-impl<'tcx> LateLintPass<'tcx> for Pass {
- fn check_item(&mut self, cx: &LateContext, it: &rustc_hir::Item) {
- match it.ident.as_str() {
- "lintme" => cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span)),
- "pleaselintme" => {
- cx.lint(PLEASE_LINT, "item is named 'pleaselintme'", |lint| lint.set_span(it.span))
- }
- _ => {}
- }
- }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[&TEST_LINT, &PLEASE_LINT]);
- reg.lint_store.register_late_pass(|_| Box::new(Pass));
- reg.lint_store.register_group(
- true,
- "lint_me",
- None,
- vec![LintId::of(&TEST_LINT), LintId::of(&PLEASE_LINT)],
- );
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs b/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs
deleted file mode 100644
index 30956deb7..000000000
--- a/src/test/ui-fulldeps/auxiliary/lint-plugin-test.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_ast;
-
-// Load rustc as a plugin to get macros
-extern crate rustc_driver;
-#[macro_use]
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_driver::plugin::Registry;
-use rustc_lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintPass};
-use rustc_ast as ast;
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-declare_lint_pass!(Pass => [TEST_LINT]);
-
-impl EarlyLintPass for Pass {
- fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
- if it.ident.name.as_str() == "lintme" {
- cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span));
- }
- }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[&TEST_LINT]);
- reg.lint_store.register_early_pass(|| Box::new(Pass));
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs b/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs
deleted file mode 100644
index c2c024865..000000000
--- a/src/test/ui-fulldeps/auxiliary/lint-tool-test.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-#![feature(rustc_private)]
-
-extern crate rustc_ast;
-
-// Load rustc as a plugin to get macros
-extern crate rustc_driver;
-#[macro_use]
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_driver::plugin::Registry;
-use rustc_lint::{EarlyContext, EarlyLintPass, LintArray, LintContext, LintId, LintPass};
-use rustc_ast as ast;
-declare_tool_lint!(pub clippy::TEST_LINT, Warn, "Warn about stuff");
-declare_tool_lint!(
- /// Some docs
- pub clippy::TEST_GROUP,
- Warn, "Warn about other stuff"
-);
-
-declare_tool_lint!(
- /// Some docs
- pub rustc::TEST_RUSTC_TOOL_LINT,
- Deny,
- "Deny internal stuff"
-);
-
-declare_lint_pass!(Pass => [TEST_LINT, TEST_GROUP, TEST_RUSTC_TOOL_LINT]);
-
-impl EarlyLintPass for Pass {
- fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
- if it.ident.name.as_str() == "lintme" {
- cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span));
- }
- if it.ident.name.as_str() == "lintmetoo" {
- cx.lint(TEST_GROUP, "item is named 'lintmetoo'", |lint| lint.set_span(it.span));
- }
- }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
- reg.lint_store.register_lints(&[&TEST_RUSTC_TOOL_LINT, &TEST_LINT, &TEST_GROUP]);
- reg.lint_store.register_early_pass(|| Box::new(Pass));
- reg.lint_store.register_group(
- true,
- "clippy::group",
- Some("clippy_group"),
- vec![LintId::of(&TEST_LINT), LintId::of(&TEST_GROUP)],
- );
-}
diff --git a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-lib.rs b/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-lib.rs
deleted file mode 100644
index 954a1e554..000000000
--- a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-lib.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-pub fn foo() {}
diff --git a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs b/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs
deleted file mode 100644
index 9b075c1a5..000000000
--- a/src/test/ui-fulldeps/auxiliary/lto-syntax-extension-plugin.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_reg: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs
deleted file mode 100644
index fd6e9e20f..000000000
--- a/src/test/ui-fulldeps/auxiliary/multiple-plugins-1.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![crate_type = "dylib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs b/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs
deleted file mode 100644
index fd6e9e20f..000000000
--- a/src/test/ui-fulldeps/auxiliary/multiple-plugins-2.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![crate_type = "dylib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs b/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs
deleted file mode 100644
index e83dfe804..000000000
--- a/src/test/ui-fulldeps/auxiliary/outlive-expansion-phase.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use std::any::Any;
-use std::cell::RefCell;
-use rustc_driver::plugin::Registry;
-
-struct Foo {
- foo: isize
-}
-
-impl Drop for Foo {
- fn drop(&mut self) {}
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {
- thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
- FOO.with(|s| *s.borrow_mut() = Some(Box::new(Foo { foo: 10 }) as Box<Any+Send>));
-}
diff --git a/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs b/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs
deleted file mode 100644
index 3ba73538e..000000000
--- a/src/test/ui-fulldeps/auxiliary/rlib-crate-test.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs b/src/test/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs
deleted file mode 100644
index 8b00fb81c..000000000
--- a/src/test/ui-fulldeps/auxiliary/syntax-extension-with-dll-deps-1.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// force-host
-
-#![crate_type = "dylib"]
-
-pub fn the_answer() -> isize {
- 2
-}