diff options
| author | bors <bors@rust-lang.org> | 2015-12-13 05:18:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-13 05:18:19 +0000 |
| commit | c4c191afae23be19cc845f67de2a36a2862c4fa1 (patch) | |
| tree | b2fa2889263f3d25263993cf869abaf6c6b9928b | |
| parent | 35b6461b6e7419ef5b81d02dfe53172219103764 (diff) | |
| parent | de0de61dd4307a6298ad2a517c5a1c541f7eac12 (diff) | |
| download | rust-c4c191afae23be19cc845f67de2a36a2862c4fa1.tar.gz rust-c4c191afae23be19cc845f67de2a36a2862c4fa1.zip | |
Auto merge of #30324 - jseyfried:unfix_30159, r=nrc
r? @nrc Since PR #30294 unintentionally fixed issue #30159, it can cause breakage for a different reason than I originally stated in the PR (see #30159, I characterized the issue precisely there). This commit limits the scope of the breakage to what I originally stated in the PR by "unfixing" the backwards incompatible part of #30159. I think fixing #30159 has enough potential for breakage to warrant a crater run. If you disagree, I can cancel this PR, leaving it fixed.
| -rw-r--r-- | src/librustc_resolve/resolve_imports.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/shadowed-use-visibility.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index fd471893acd..94c3ea073d2 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -871,6 +871,9 @@ impl<'a, 'b:'a, 'tcx:'b> ImportResolver<'a, 'b, 'tcx> { is_public: is_public }; } + } else { + // FIXME #30159: This is required for backwards compatability. + dest_import_resolution[namespace].is_public |= is_public; } }; merge_child_item(ValueNS); diff --git a/src/test/compile-fail/shadowed-use-visibility.rs b/src/test/compile-fail/shadowed-use-visibility.rs index 1bf7f393384..bfc6a4ec9b8 100644 --- a/src/test/compile-fail/shadowed-use-visibility.rs +++ b/src/test/compile-fail/shadowed-use-visibility.rs @@ -17,10 +17,6 @@ mod foo { mod bar { use foo::bar::f as g; //~ ERROR unresolved import - - use foo as f; - pub use foo::*; } -use bar::f::f; //~ ERROR unresolved import fn main() {} |
