rollup merge of #22286: nikomatsakis/variance-4b
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
This commit is contained in:
commit
1506b34e0c
383 changed files with 3313 additions and 1353 deletions
|
@ -45,11 +45,11 @@ fn no_prelude(attrs: &[ast::Attribute]) -> bool {
|
|||
attr::contains_name(attrs, "no_implicit_prelude")
|
||||
}
|
||||
|
||||
struct StandardLibraryInjector<'a> {
|
||||
alt_std_name: Option<String>
|
||||
struct StandardLibraryInjector {
|
||||
alt_std_name: Option<String>,
|
||||
}
|
||||
|
||||
impl<'a> fold::Folder for StandardLibraryInjector<'a> {
|
||||
impl fold::Folder for StandardLibraryInjector {
|
||||
fn fold_crate(&mut self, mut krate: ast::Crate) -> ast::Crate {
|
||||
|
||||
// The name to use in `extern crate "name" as std;`
|
||||
|
@ -80,9 +80,10 @@ fn inject_crates_ref(krate: ast::Crate, alt_std_name: Option<String>) -> ast::Cr
|
|||
fold.fold_crate(krate)
|
||||
}
|
||||
|
||||
struct PreludeInjector<'a>;
|
||||
struct PreludeInjector;
|
||||
|
||||
impl<'a> fold::Folder for PreludeInjector<'a> {
|
||||
|
||||
impl fold::Folder for PreludeInjector {
|
||||
fn fold_crate(&mut self, mut krate: ast::Crate) -> ast::Crate {
|
||||
// only add `use std::prelude::*;` if there wasn't a
|
||||
// `#![no_implicit_prelude]` at the crate level.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue