-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allow impls to force public types
This code in resolve accidentally forced all types with an impl to become public. This fixes it by default inheriting the privacy of what was previously there and then becoming `true` if nothing else exits. Closes #10545
- Loading branch information
1 parent
d5798b3
commit eabf11b
Showing
10 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
|
||
mod a { | ||
struct S; | ||
impl S { } | ||
} | ||
|
||
fn foo(_: a::S) { //~ ERROR: type `S` is private | ||
} | ||
|
||
fn main() {} |
eabf11b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from pcwalton
at alexcrichton@eabf11b
eabf11b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/issue-10545 = eabf11b into auto
eabf11b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/issue-10545 = eabf11b merged ok, testing candidate = 09b8406
eabf11b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3048
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/891
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/893
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3054
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2156
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2157
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3065
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2154
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2159
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3067
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2155
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2158
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2234
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3053
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2155
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2159
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2829
eabf11b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 09b8406