Rollup merge of #58259 - taiki-e:librustc_codegen_utils-2018, r=Centril

librustc_codegen_utils => 2018

Transitions `librustc_codegen_utils` to Rust 2018; cc #58099

r? @Centril
This commit is contained in:
Mazdak Farrokhzad
2019-02-09 00:15:59 +01:00
committed by GitHub
5 changed files with 18 additions and 23 deletions

View File

@@ -14,18 +14,10 @@
#![recursion_limit="256"]
extern crate flate2;
#[macro_use]
extern crate log;
#![deny(rust_2018_idioms)]
#[macro_use]
extern crate rustc;
extern crate rustc_target;
extern crate rustc_metadata;
extern crate rustc_mir;
extern crate rustc_incremental;
extern crate syntax;
extern crate syntax_pos;
#[macro_use] extern crate rustc_data_structures;
use rustc::ty::TyCtxt;
@@ -40,7 +32,7 @@ pub mod symbol_names_test;
/// error in codegen. This is used to write compile-fail tests
/// that actually test that compilation succeeds without
/// reporting an error.
pub fn check_for_rustc_errors_attr(tcx: TyCtxt) {
pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_, '_, '_>) {
if let Some((def_id, _)) = tcx.entry_fn(LOCAL_CRATE) {
if tcx.has_attr(def_id, "rustc_error") {
tcx.sess.span_fatal(tcx.def_span(def_id), "compilation successful");