Skip to content

Rollup of 14 pull requests #53049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8642412
Update libc and activate align feature
faern Jul 17, 2018
2b5fc66
Make Ipv{4,6}Addr::new const fns
faern Jul 19, 2018
0d2f96e
Move IPs to assoc consts
faern Jul 20, 2018
798680a
Add Ipv4Addr BROADCAST assoc const
faern Jul 29, 2018
312cdb4
Simplify is_broadcast
faern Jul 29, 2018
0da7da8
Align 6-week cycle check with beta promotion instead of stable release.
kennytm Aug 1, 2018
66a4718
rustbuild: fix local_rebuild
Keruspe Aug 2, 2018
0217459
Update LLVM submodule to 7.0
alexcrichton Aug 2, 2018
f3733a2
make `everybody_loops` keep item declarations
QuietMisdreavus Aug 2, 2018
3a93e91
Remove unnecessary local in await! macro
cramertj Aug 2, 2018
8df498b
more fixes for everybody_loops
QuietMisdreavus Aug 2, 2018
d6a7a3c
add rustdoc test for `everybody_loops` fix
QuietMisdreavus Aug 2, 2018
dda85ab
Stabilize --color and --error-format options in rustdoc
GuillaumeGomez Aug 2, 2018
23bdc82
RELEASES.md: fix the `hash_map::Entry::or_default` link
cuviper Aug 2, 2018
4471537
make TinyList more readable and optimize remove(_)
llogiq Aug 2, 2018
7e77d19
preserve order if blocks are between items
QuietMisdreavus Aug 2, 2018
71460d4
volatile operations docs: clarify that this does not help wrt. concur…
RalfJung Aug 3, 2018
94de821
Specify reentrancy gurantees of `Once::call_once`
matklad Aug 3, 2018
a2f9aaf
Fix trailnig WS
matklad Aug 3, 2018
d4beeca
Move validate_crate_name to rustc_metadata
Mark-Simulacrum Jul 31, 2018
cc1a6b9
Delete dummy crate store
Mark-Simulacrum Jul 31, 2018
eb0bc64
Visibility is now a query
Mark-Simulacrum Jul 31, 2018
5aec365
Store concrete crate stores where possible
Mark-Simulacrum Jul 31, 2018
6fdd6f6
Move unused trait functions to inherent functions
Mark-Simulacrum Jul 31, 2018
e2cda7d
Fix invalid code css rule
GuillaumeGomez Aug 3, 2018
903851f
Highlight closure spans for borrow and initialization errors
matthewjasper Aug 1, 2018
5639e21
Tests for closure spans
matthewjasper Aug 1, 2018
12af36a
Update tests for new spans for nll errors involving closures
matthewjasper Aug 1, 2018
a233ec8
Rollup merge of #52872 - faern:use-modern-alignment-libc, r=TimNN
cramertj Aug 3, 2018
4043448
Rollup merge of #52927 - Mark-Simulacrum:cratestore-cleanup, r=alexcr…
cramertj Aug 3, 2018
44a668b
Rollup merge of #52940 - kennytm:move-checktool-protection-week, r=al…
cramertj Aug 3, 2018
1923e0b
Rollup merge of #52959 - matthewjasper:closure-spans, r=pnkfelix
cramertj Aug 3, 2018
1c35e52
Rollup merge of #52969 - Keruspe:local_rebuild, r=alexcrichton
cramertj Aug 3, 2018
a635638
Rollup merge of #52983 - alexcrichton:update-llvm, r=kennytm
cramertj Aug 3, 2018
e44c046
Rollup merge of #52995 - cramertj:smaller-await, r=withoutboats
cramertj Aug 3, 2018
65e39b8
Rollup merge of #52996 - cuviper:1.28-or_default, r=Mark-Simulacrum
cramertj Aug 3, 2018
e492215
Rollup merge of #52997 - llogiq:tiny-list-opt, r=varkor
cramertj Aug 3, 2018
e764022
Rollup merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loop…
cramertj Aug 3, 2018
6df26f4
Rollup merge of #53003 - GuillaumeGomez:stabilize-rustdoc-options, r=…
cramertj Aug 3, 2018
5ffeaa8
Rollup merge of #53022 - RalfJung:volatile, r=alexcrichton
cramertj Aug 3, 2018
0fbfdf6
Rollup merge of #53024 - matklad:patch-1, r=alexcrichton
cramertj Aug 3, 2018
290f9e9
Rollup merge of #53041 - GuillaumeGomez:fix-code-css-rule, r=QuietMis…
cramertj Aug 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Compatibility Notes
[`alloc::handle_alloc_error`]: https://doc.rust-lang.org/std/alloc/fn.handle_alloc_error.html
[`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
[`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html
[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.or_default
[`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html
[`num::NonZeroUsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html
[`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html
Expand Down
12 changes: 12 additions & 0 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,7 @@ dependencies = [
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_incremental 0.0.0",
"rustc_metadata_utils 0.0.0",
"rustc_mir 0.0.0",
"rustc_target 0.0.0",
"syntax 0.0.0",
Expand Down Expand Up @@ -2352,13 +2353,23 @@ dependencies = [
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_metadata_utils 0.0.0",
"rustc_target 0.0.0",
"serialize 0.0.0",
"syntax 0.0.0",
"syntax_ext 0.0.0",
"syntax_pos 0.0.0",
]

[[package]]
name = "rustc_metadata_utils"
version = "0.0.0"
dependencies = [
"rustc 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]

[[package]]
name = "rustc_mir"
version = "0.0.0"
Expand Down Expand Up @@ -2441,6 +2452,7 @@ dependencies = [
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
"rustc_errors 0.0.0",
"rustc_metadata 0.0.0",
"syntax 0.0.0",
"syntax_pos 0.0.0",
]
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ impl<'a> Builder<'a> {
// compiler, but for tools we just use the precompiled libraries that
// we've downloaded
let use_snapshot = mode == Mode::ToolBootstrap;
assert!(!use_snapshot || stage == 0);
assert!(!use_snapshot || stage == 0 || self.local_rebuild);

let maybe_sysroot = self.sysroot(compiler);
let sysroot = if use_snapshot {
Expand Down
10 changes: 6 additions & 4 deletions src/ci/docker/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ TOOLSTATE_FILE="$(realpath $2)"
OS="$3"
COMMIT="$(git rev-parse HEAD)"
CHANGED_FILES="$(git diff --name-status HEAD HEAD^)"
SIX_WEEK_CYCLE="$(( ($(date +%s) / 604800 - 3) % 6 ))"
# ^ 1970 Jan 1st is a Thursday, and our release dates are also on Thursdays,
# thus we could divide by 604800 (7 days in seconds) directly.
SIX_WEEK_CYCLE="$(( ($(date +%s) / 86400 - 20) % 42 ))"
# ^ Number of days after the last promotion of beta.
# Its value is 41 on the Tuesday where "Promote master to beta (T-2)" happens.
# The Wednesday after this has value 0.
# We track this value to prevent regressing tools in the last week of the 6-week cycle.

touch "$TOOLSTATE_FILE"

Expand Down Expand Up @@ -98,7 +100,7 @@ change_toolstate() {
if python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" changed; then
echo 'Toolstate is not changed. Not updating.'
else
if [ $SIX_WEEK_CYCLE -eq 5 ]; then
if [ $SIX_WEEK_CYCLE -ge 35 ]; then
python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" regressed
fi
sed -i "1 a\\
Expand Down
2 changes: 1 addition & 1 deletion src/libcompiler_builtins
30 changes: 30 additions & 0 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ pub unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
/// `write_bytes`, or `copy`). Note that `*src = foo` counts as a use
/// because it will attempt to drop the value previously at `*src`.
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
/// a race between a `read_volatile` and any write operation to the same location
/// is undefined behavior.
///
/// # Examples
///
/// Basic usage:
Expand Down Expand Up @@ -498,6 +504,12 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
/// This is appropriate for initializing uninitialized memory, or overwriting
/// memory that has previously been `read` from.
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
/// a race between a `write_volatile` and any other operation (reading or writing)
/// on the same location is undefined behavior.
///
/// # Examples
///
/// Basic usage:
Expand Down Expand Up @@ -1057,6 +1069,12 @@ impl<T: ?Sized> *const T {
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
/// a race between a `read_volatile` and any write operation to the same location
/// is undefined behavior.
///
/// # Examples
///
/// Basic usage:
Expand Down Expand Up @@ -1790,6 +1808,12 @@ impl<T: ?Sized> *mut T {
/// `write_bytes`, or `copy`). Note that `*self = foo` counts as a use
/// because it will attempt to drop the value previously at `*self`.
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
/// a race between a `read_volatile` and any write operation to the same location
/// is undefined behavior.
///
/// # Examples
///
/// Basic usage:
Expand Down Expand Up @@ -2105,6 +2129,12 @@ impl<T: ?Sized> *mut T {
/// This is appropriate for initializing uninitialized memory, or overwriting
/// memory that has previously been `read` from.
///
/// Just like in C, whether an operation is volatile has no bearing whatsoever
/// on questions involving concurrent access from multiple threads. Volatile
/// accesses behave exactly like non-atomic accesses in that regard. In particular,
/// a race between a `write_volatile` and any other operation (reading or writing)
/// on the same location is undefined behavior.
///
/// # Examples
///
/// Basic usage:
Expand Down
2 changes: 1 addition & 1 deletion src/liblibc
Submodule liblibc updated 48 files
+1 −1 Cargo.lock
+1 −0 Cargo.toml
+13 −1 README.md
+6 −6 ci/docker/aarch64-unknown-linux-musl/Dockerfile
+6 −6 ci/docker/arm-unknown-linux-musleabihf/Dockerfile
+7 −6 ci/docker/i686-unknown-linux-musl/Dockerfile
+4 −1 ci/docker/sparc64-unknown-linux-gnu/Dockerfile
+6 −6 ci/docker/x86_64-unknown-linux-musl/Dockerfile
+10 −2 ci/run.sh
+1 −0 libc-test/Cargo.toml
+9 −9 libc-test/build.rs
+110 −38 src/fuchsia/mod.rs
+1 −1 src/lib.rs
+19 −2 src/macros.rs
+2 −0 src/redox/net.rs
+4 −0 src/unix/bsd/apple/mod.rs
+24 −0 src/unix/bsd/freebsdlike/dragonfly/mod.rs
+28 −0 src/unix/bsd/freebsdlike/freebsd/mod.rs
+0 −13 src/unix/bsd/netbsdlike/mod.rs
+14 −0 src/unix/bsd/netbsdlike/netbsd/mod.rs
+11 −1 src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+203 −1 src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs
+4 −2 src/unix/mod.rs
+72 −23 src/unix/newlib/mod.rs
+7 −0 src/unix/notbsd/android/mod.rs
+27 −12 src/unix/notbsd/emscripten.rs
+52 −54 src/unix/notbsd/linux/mips/mips32.rs
+52 −54 src/unix/notbsd/linux/mips/mips64.rs
+5 −0 src/unix/notbsd/linux/mips/mod.rs
+132 −38 src/unix/notbsd/linux/mod.rs
+85 −0 src/unix/notbsd/linux/musl/b32/arm.rs
+85 −0 src/unix/notbsd/linux/musl/b32/mips.rs
+4 −84 src/unix/notbsd/linux/musl/b32/mod.rs
+866 −0 src/unix/notbsd/linux/musl/b32/powerpc.rs
+85 −0 src/unix/notbsd/linux/musl/b32/x86.rs
+2 −1 src/unix/notbsd/linux/musl/mod.rs
+52 −54 src/unix/notbsd/linux/other/b32/mod.rs
+28 −27 src/unix/notbsd/linux/other/b64/aarch64.rs
+52 −54 src/unix/notbsd/linux/other/b64/not_x32.rs
+52 −54 src/unix/notbsd/linux/other/b64/powerpc64.rs
+25 −24 src/unix/notbsd/linux/other/b64/sparc64.rs
+25 −24 src/unix/notbsd/linux/other/b64/x32.rs
+5 −0 src/unix/notbsd/linux/other/mod.rs
+30 −24 src/unix/notbsd/linux/s390x.rs
+5 −0 src/unix/uclibc/mips/mips32.rs
+5 −0 src/unix/uclibc/mips/mips64.rs
+72 −23 src/unix/uclibc/mod.rs
+67 −11 src/unix/uclibc/x86_64/mod.rs
131 changes: 1 addition & 130 deletions src/librustc/middle/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
//! are *mostly* used as a part of that interface, but these should
//! probably get a better home if someone can find one.

use hir::def;
use hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use hir::map as hir_map;
use hir::map::definitions::{Definitions, DefKey, DefPathTable};
use hir::map::definitions::{DefKey, DefPathTable};
use hir::svh::Svh;
use ty::{self, TyCtxt};
use session::{Session, CrateDisambiguator};
Expand All @@ -34,8 +33,6 @@ use session::search_paths::PathKind;
use std::any::Any;
use std::path::{Path, PathBuf};
use syntax::ast;
use syntax::edition::Edition;
use syntax::ext::base::SyntaxExtension;
use syntax::symbol::Symbol;
use syntax_pos::Span;
use rustc_target::spec::Target;
Expand Down Expand Up @@ -140,11 +137,6 @@ pub struct ForeignModule {
pub def_id: DefId,
}

pub enum LoadedMacro {
MacroDef(ast::Item),
ProcMacro(Lrc<SyntaxExtension>),
}

#[derive(Copy, Clone, Debug)]
pub struct ExternCrate {
pub src: ExternCrateSource,
Expand Down Expand Up @@ -221,29 +213,18 @@ pub trait MetadataLoader {
pub trait CrateStore {
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Lrc<dyn Any>;

// access to the metadata loader
fn metadata_loader(&self) -> &dyn MetadataLoader;

// resolve
fn def_key(&self, def: DefId) -> DefKey;
fn def_path(&self, def: DefId) -> hir_map::DefPath;
fn def_path_hash(&self, def: DefId) -> hir_map::DefPathHash;
fn def_path_table(&self, cnum: CrateNum) -> Lrc<DefPathTable>;

// "queries" used in resolve that aren't tracked for incremental compilation
fn visibility_untracked(&self, def: DefId) -> ty::Visibility;
fn export_macros_untracked(&self, cnum: CrateNum);
fn dep_kind_untracked(&self, cnum: CrateNum) -> DepKind;
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol;
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator;
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh;
fn crate_edition_untracked(&self, cnum: CrateNum) -> Edition;
fn struct_field_names_untracked(&self, def: DefId) -> Vec<ast::Name>;
fn item_children_untracked(&self, did: DefId, sess: &Session) -> Vec<def::Export>;
fn load_macro_untracked(&self, did: DefId, sess: &Session) -> LoadedMacro;
fn extern_mod_stmt_cnum_untracked(&self, emod_id: ast::NodeId) -> Option<CrateNum>;
fn item_generics_cloned_untracked(&self, def: DefId, sess: &Session) -> ty::Generics;
fn associated_item_cloned_untracked(&self, def: DefId) -> ty::AssociatedItem;
fn postorder_cnums_untracked(&self) -> Vec<CrateNum>;

// This is basically a 1-based range of ints, which is a little
Expand All @@ -260,116 +241,6 @@ pub trait CrateStore {

pub type CrateStoreDyn = dyn CrateStore + sync::Sync;

// FIXME: find a better place for this?
pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option<Span>) {
let mut err_count = 0;
{
let mut say = |s: &str| {
match (sp, sess) {
(_, None) => bug!("{}", s),
(Some(sp), Some(sess)) => sess.span_err(sp, s),
(None, Some(sess)) => sess.err(s),
}
err_count += 1;
};
if s.is_empty() {
say("crate name must not be empty");
}
for c in s.chars() {
if c.is_alphanumeric() { continue }
if c == '_' { continue }
say(&format!("invalid character `{}` in crate name: `{}`", c, s));
}
}

if err_count > 0 {
sess.unwrap().abort_if_errors();
}
}

/// A dummy crate store that does not support any non-local crates,
/// for test purposes.
pub struct DummyCrateStore;

#[allow(unused_variables)]
impl CrateStore for DummyCrateStore {
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Lrc<dyn Any>
{ bug!("crate_data_as_rc_any") }
// item info
fn visibility_untracked(&self, def: DefId) -> ty::Visibility { bug!("visibility") }
fn item_generics_cloned_untracked(&self, def: DefId, sess: &Session) -> ty::Generics
{ bug!("item_generics_cloned") }

// trait/impl-item info
fn associated_item_cloned_untracked(&self, def: DefId) -> ty::AssociatedItem
{ bug!("associated_item_cloned") }

// crate metadata
fn dep_kind_untracked(&self, cnum: CrateNum) -> DepKind { bug!("is_explicitly_linked") }
fn export_macros_untracked(&self, cnum: CrateNum) { bug!("export_macros") }
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol { bug!("crate_name") }
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator {
bug!("crate_disambiguator")
}
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh { bug!("crate_hash") }
fn crate_edition_untracked(&self, cnum: CrateNum) -> Edition { bug!("crate_edition_untracked") }

// resolve
fn def_key(&self, def: DefId) -> DefKey { bug!("def_key") }
fn def_path(&self, def: DefId) -> hir_map::DefPath {
bug!("relative_def_path")
}
fn def_path_hash(&self, def: DefId) -> hir_map::DefPathHash {
bug!("def_path_hash")
}
fn def_path_table(&self, cnum: CrateNum) -> Lrc<DefPathTable> {
bug!("def_path_table")
}
fn struct_field_names_untracked(&self, def: DefId) -> Vec<ast::Name> {
bug!("struct_field_names")
}
fn item_children_untracked(&self, did: DefId, sess: &Session) -> Vec<def::Export> {
bug!("item_children")
}
fn load_macro_untracked(&self, did: DefId, sess: &Session) -> LoadedMacro { bug!("load_macro") }

fn crates_untracked(&self) -> Vec<CrateNum> { vec![] }

// utility functions
fn extern_mod_stmt_cnum_untracked(&self, emod_id: ast::NodeId) -> Option<CrateNum> { None }
fn encode_metadata<'a, 'tcx>(&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
link_meta: &LinkMeta)
-> EncodedMetadata {
bug!("encode_metadata")
}
fn metadata_encoding_version(&self) -> &[u8] { bug!("metadata_encoding_version") }
fn postorder_cnums_untracked(&self) -> Vec<CrateNum> { bug!("postorder_cnums_untracked") }

// access to the metadata loader
fn metadata_loader(&self) -> &dyn MetadataLoader { bug!("metadata_loader") }
}

pub trait CrateLoader {
fn process_extern_crate(&mut self, item: &ast::Item, defs: &Definitions) -> CrateNum;

fn process_path_extern(
&mut self,
name: Symbol,
span: Span,
) -> CrateNum;

fn process_use_extern(
&mut self,
name: Symbol,
span: Span,
id: ast::NodeId,
defs: &Definitions,
) -> CrateNum;

fn postprocess(&mut self, krate: &ast::Crate);
}

// This method is used when generating the command line to pass through to
// system linker. The linker expects undefined symbols on the left of the
// command line to be defined in libraries on the right, not the other way
Expand Down
1 change: 1 addition & 0 deletions src/librustc_codegen_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ rustc_target = { path = "../librustc_target" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_mir = { path = "../librustc_mir" }
rustc_incremental = { path = "../librustc_incremental" }
rustc_metadata_utils = { path = "../librustc_metadata_utils" }
1 change: 1 addition & 0 deletions src/librustc_codegen_utils/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern crate rustc_incremental;
extern crate syntax;
extern crate syntax_pos;
#[macro_use] extern crate rustc_data_structures;
extern crate rustc_metadata_utils;

use rustc::ty::TyCtxt;

Expand Down
5 changes: 3 additions & 2 deletions src/librustc_codegen_utils/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

use rustc::session::config::{self, OutputFilenames, Input, OutputType};
use rustc::session::Session;
use rustc::middle::cstore::{self, LinkMeta};
use rustc::middle::cstore::LinkMeta;
use rustc::hir::svh::Svh;
use std::path::{Path, PathBuf};
use syntax::{ast, attr};
use syntax_pos::Span;
use rustc_metadata_utils::validate_crate_name;

pub fn out_filename(sess: &Session,
crate_type: config::CrateType,
Expand Down Expand Up @@ -61,7 +62,7 @@ pub fn find_crate_name(sess: Option<&Session>,
attrs: &[ast::Attribute],
input: &Input) -> String {
let validate = |s: String, span: Option<Span>| {
cstore::validate_crate_name(sess, &s, span);
validate_crate_name(sess, &s, span);
s
};

Expand Down
Loading