Skip to content

Commit a07b4d4

Browse files
committed
---
yaml --- r: 274429 b: refs/heads/stable c: e768fa7 h: refs/heads/master i: 274427: c07d9f4
1 parent 99bb0cf commit a07b4d4

28 files changed

+128
-324
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 91e804409b7481677901345d9abcb6e8bd3152ad
32+
refs/heads/stable: e768fa729fb21549a39744bd3bfad03643cc10da
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ do
11641164
;;
11651165

11661166

1167-
x86_64-*-musl)
1167+
*-musl)
11681168
if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ]
11691169
then
11701170
err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found"

branches/stable/mk/cfg/armv7-unknown-linux-gnueabihf.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFG_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).so
88
CFG_STATIC_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).a
99
CFG_LIB_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7-a
12-
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7-a
11+
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7
12+
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7
1313
CFG_GCCISH_CXXFLAGS_armv7-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_armv7-unknown-linux-gnueabihf := -shared -fPIC -g
1515
CFG_GCCISH_DEF_FLAG_armv7-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=

branches/stable/mk/cfg/mips-unknown-linux-gnu.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mips-unknown-linux-gnu := 1
2020
CFG_LDPATH_mips-unknown-linux-gnu :=
2121
CFG_RUN_mips-unknown-linux-gnu=
2222
CFG_RUN_TARG_mips-unknown-linux-gnu=
23-
RUSTC_FLAGS_mips-unknown-linux-gnu :=
23+
RUSTC_FLAGS_mips-unknown-linux-gnu := -C target-cpu=mips32r2 -C target-feature="+mips32r2" -C soft-float
2424
CFG_GNU_TRIPLE_mips-unknown-linux-gnu := mips-unknown-linux-gnu

branches/stable/mk/cfg/mips-unknown-linux-musl.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

branches/stable/mk/cfg/mipsel-unknown-linux-gnu.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mipsel-unknown-linux-gnu := 1
2020
CFG_LDPATH_mipsel-unknown-linux-gnu :=
2121
CFG_RUN_mipsel-unknown-linux-gnu=
2222
CFG_RUN_TARG_mipsel-unknown-linux-gnu=
23-
RUSTC_FLAGS_mipsel-unknown-linux-gnu :=
23+
RUSTC_FLAGS_mipsel-unknown-linux-gnu := -C target-cpu=mips32 -C target-feature="+mips32"
2424
CFG_GNU_TRIPLE_mipsel-unknown-linux-gnu := mipsel-unknown-linux-gnu

branches/stable/mk/cfg/mipsel-unknown-linux-musl.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

branches/stable/src/liblibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 30f70baa6cc1ba3ddebb55b988fafbad0c0cc810
1+
Subproject commit 91ff43c736de664f8d3cd351e148c09cdea6731e

branches/stable/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn target() -> Target {
2323

2424
options: TargetOptions {
2525
features: "+v7,+vfp2,+neon".to_string(),
26-
cpu: "cortex-a8".to_string(),
26+
cpu: "cortex-a7".to_string(),
2727
.. base
2828
}
2929
}

branches/stable/src/librustc_back/target/mips_unknown_linux_gnu.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use target::{Target, TargetOptions};
11+
use target::Target;
1212

1313
pub fn target() -> Target {
1414
Target {
@@ -19,10 +19,6 @@ pub fn target() -> Target {
1919
target_os: "linux".to_string(),
2020
target_env: "gnu".to_string(),
2121
target_vendor: "unknown".to_string(),
22-
options: TargetOptions {
23-
cpu: "mips32r2".to_string(),
24-
features: "+mips32r2,+soft-float".to_string(),
25-
..super::linux_base::opts()
26-
},
22+
options: super::linux_base::opts()
2723
}
2824
}

branches/stable/src/librustc_back/target/mips_unknown_linux_musl.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

branches/stable/src/librustc_back/target/mipsel_unknown_linux_gnu.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use target::{Target, TargetOptions};
11+
use target::Target;
1212

1313
pub fn target() -> Target {
1414
Target {
@@ -20,10 +20,6 @@ pub fn target() -> Target {
2020
target_env: "gnu".to_string(),
2121
target_vendor: "unknown".to_string(),
2222

23-
options: TargetOptions {
24-
cpu: "mips32".to_string(),
25-
features: "+mips32".to_string(),
26-
..super::linux_base::opts()
27-
},
23+
options: super::linux_base::opts()
2824
}
2925
}

branches/stable/src/librustc_back/target/mipsel_unknown_linux_musl.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

branches/stable/src/librustc_back/target/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,6 @@ impl Target {
420420
armv7_unknown_linux_gnueabihf,
421421
aarch64_unknown_linux_gnu,
422422
x86_64_unknown_linux_musl,
423-
mips_unknown_linux_musl,
424-
mipsel_unknown_linux_musl,
425423

426424
i686_linux_android,
427425
arm_linux_androideabi,

branches/stable/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,37 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
107107
/// Defines `name` in namespace `ns` of module `parent` to be `def` if it is not yet defined;
108108
/// otherwise, reports an error.
109109
fn define<T: ToNameBinding<'b>>(&self, parent: Module<'b>, name: Name, ns: Namespace, def: T) {
110-
let name_binding = def.to_name_binding();
111-
let span = name_binding.span.unwrap_or(DUMMY_SP);
112-
self.check_for_conflicts_between_external_crates_and_items(&parent, name, span);
113-
if !parent.try_define_child(name, ns, name_binding) {
110+
let binding = def.to_name_binding();
111+
let old_binding = match parent.try_define_child(name, ns, binding.clone()) {
112+
Some(old_binding) => old_binding,
113+
None => return,
114+
};
115+
116+
let span = binding.span.unwrap_or(DUMMY_SP);
117+
if !old_binding.is_extern_crate() && !binding.is_extern_crate() {
114118
// Record an error here by looking up the namespace that had the duplicate
115119
let ns_str = match ns { TypeNS => "type or module", ValueNS => "value" };
116120
let resolution_error = ResolutionError::DuplicateDefinition(ns_str, name);
117121
let mut err = resolve_struct_error(self, span, resolution_error);
118122

119-
if let Some(sp) = parent.children.borrow().get(&(name, ns)).unwrap().span {
123+
if let Some(sp) = old_binding.span {
120124
let note = format!("first definition of {} `{}` here", ns_str, name);
121125
err.span_note(sp, &note);
122126
}
123127
err.emit();
128+
} else if old_binding.is_extern_crate() && binding.is_extern_crate() {
129+
span_err!(self.session,
130+
span,
131+
E0259,
132+
"an external crate named `{}` has already been imported into this module",
133+
name);
134+
} else {
135+
span_err!(self.session,
136+
span,
137+
E0260,
138+
"the name `{}` conflicts with an external crate \
139+
that has been imported into this module",
140+
name);
124141
}
125142
}
126143

@@ -289,14 +306,9 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
289306
self.external_exports.insert(def_id);
290307
let parent_link = ModuleParentLink(parent, name);
291308
let def = Def::Mod(def_id);
292-
let external_module = self.new_module(parent_link, Some(def), false, true);
293-
294-
debug!("(build reduced graph for item) found extern `{}`",
295-
module_to_string(&*external_module));
296-
self.check_for_conflicts_for_external_crate(parent, name, sp);
297-
parent.external_module_children
298-
.borrow_mut()
299-
.insert(name, external_module);
309+
let external_module = self.new_extern_crate_module(parent_link, def);
310+
self.define(parent, name, TypeNS, (external_module, sp));
311+
300312
self.build_reduced_graph_for_external_crate(&external_module);
301313
}
302314
parent

branches/stable/src/librustc_resolve/check_unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<'a, 'b, 'v, 'tcx> Visitor<'v> for UnusedImportCheckVisitor<'a, 'b, 'tcx> {
117117
// whether they're used or not. Also ignore imports with a dummy span
118118
// because this means that they were generated in some fashion by the
119119
// compiler and we don't need to consider them.
120-
if item.vis == hir::Public || item.span.source_equal(&DUMMY_SP) {
120+
if item.vis == hir::Public || item.span == DUMMY_SP {
121121
return;
122122
}
123123

0 commit comments

Comments
 (0)