Skip to content

Commit

Permalink
Rollup merge of rust-lang#58222 - taiki-e:librustc_allocator-2018, r=…
Browse files Browse the repository at this point in the history
…Centril

librustc_allocator => 2018

Transitions `librustc_allocator` to Rust 2018; cc rust-lang#58099

r? @Centril
  • Loading branch information
kennytm authored Feb 8, 2019
2 parents 6379aff + 44b2cc0 commit 0e57277
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/librustc_allocator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["The Rust Project Developers"]
name = "rustc_allocator"
version = "0.0.0"
edition = "2018"

[lib]
path = "lib.rs"
Expand Down
10 changes: 5 additions & 5 deletions src/librustc_allocator/expand.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use log::debug;
use rustc::middle::allocator::AllocatorKind;
use rustc_errors;
use smallvec::SmallVec;
use smallvec::{smallvec, SmallVec};
use syntax::{
ast::{
self, Arg, Attribute, Crate, Expr, FnHeader, Generics, Ident, Item, ItemKind,
Expand All @@ -23,7 +23,7 @@ use syntax::{
};
use syntax_pos::Span;

use {AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};
use crate::{AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS};

pub fn modify(
sess: &ParseSess,
Expand Down Expand Up @@ -54,7 +54,7 @@ struct ExpandAllocatorDirectives<'a> {
in_submod: isize,
}

impl<'a> MutVisitor for ExpandAllocatorDirectives<'a> {
impl MutVisitor for ExpandAllocatorDirectives<'_> {
fn flat_map_item(&mut self, item: P<Item>) -> SmallVec<[P<Item>; 1]> {
debug!("in submodule {}", self.in_submod);

Expand Down Expand Up @@ -168,7 +168,7 @@ struct AllocFnFactory<'a> {
cx: ExtCtxt<'a>,
}

impl<'a> AllocFnFactory<'a> {
impl AllocFnFactory<'_> {
fn allocator_fn(&self, method: &AllocatorMethod) -> P<Item> {
let mut abi_args = Vec::new();
let mut i = 0;
Expand Down
11 changes: 1 addition & 10 deletions src/librustc_allocator/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#![feature(nll)]
#![feature(rustc_private)]

#[macro_use] extern crate log;
extern crate rustc;
extern crate rustc_data_structures;
extern crate rustc_errors;
extern crate rustc_target;
extern crate syntax;
extern crate syntax_pos;
#[macro_use]
extern crate smallvec;
#![deny(rust_2018_idioms)]

pub mod expand;

Expand Down

0 comments on commit 0e57277

Please sign in to comment.