Skip to content

Commit 3e6eaeb

Browse files
committed
auto merge of #21205 : alexcrichton/rust/issue-21202, r=nikomatsakis
Loading methods from external crates was erroneously using the type's privacy for each method instead of each method's privacy. This commit fixes that. Closes #21202 This commit also moves privacy to its own crate because I thought that was where the bug was. Turns out it wasn't, but it helped me iterate at least!
2 parents 378fb58 + 8115222 commit 3e6eaeb

File tree

8 files changed

+1655
-1568
lines changed

8 files changed

+1655
-1568
lines changed

mk/crates.mk

+8-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ TARGET_CRATES := libc std flate arena term \
5454
log regex graphviz core rbml alloc \
5555
unicode
5656
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57-
rustc_trans rustc_back rustc_llvm
57+
rustc_trans rustc_back rustc_llvm rustc_privacy
5858
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
5959
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6060
TOOLS := compiletest rustdoc rustc rustbook
@@ -68,12 +68,15 @@ DEPS_std := core libc rand alloc collections unicode \
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
7070
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
71-
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans
71+
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
72+
rustc_trans rustc_privacy
73+
7274
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7375
log syntax serialize rustc_llvm
7476
DEPS_rustc_typeck := rustc syntax
7577
DEPS_rustc_borrowck := rustc log graphviz syntax
7678
DEPS_rustc_resolve := rustc log syntax
79+
DEPS_rustc_privacy := rustc log syntax
7780
DEPS_rustc := syntax flate arena serialize getopts rbml \
7881
log graphviz rustc_llvm rustc_back
7982
DEPS_rustc_llvm := native:rustllvm libc std
@@ -122,12 +125,13 @@ DOC_CRATES := $(filter-out rustc, \
122125
$(filter-out rustc_borrowck, \
123126
$(filter-out rustc_resolve, \
124127
$(filter-out rustc_driver, \
128+
$(filter-out rustc_privacy, \
125129
$(filter-out log, \
126130
$(filter-out regex, \
127131
$(filter-out getopts, \
128-
$(filter-out syntax, $(CRATES)))))))))))
132+
$(filter-out syntax, $(CRATES))))))))))))
129133
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
130-
rustc_typeck rustc_driver syntax
134+
rustc_typeck rustc_driver syntax rustc_privacy
131135

132136
# This macro creates some simple definitions for each crate being built, just
133137
# some munging of all of the parameters above.

0 commit comments

Comments
 (0)