Skip to content

Commit 49d3dc0

Browse files
lambinooLamb
authored andcommitted
Compute most of Public/Exported access level in rustc_resolve
Mak DefId to AccessLevel map in resolve for export hir_id to accesslevel in resolve and applied in privacy using local def id removing tracing probes making function not recursive and adding comments Move most of Exported/Public res to rustc_resolve moving public/export res to resolve fix missing stability attributes in core, std and alloc move code to access_levels.rs return for some kinds instead of going through them Export correctness, macro changes, comments add comment for import binding add comment for import binding renmae to access level visitor, remove comments, move fn as closure, remove new_key fmt fix rebase fix rebase fmt fmt fix: move macro def to rustc_resolve fix: reachable AccessLevel for enum variants fmt fix: missing stability attributes for other architectures allow unreachable pub in rustfmt fix: missing impl access level + renaming export to reexport Missing impl access level was found thanks to a test in clippy
1 parent 091b9d4 commit 49d3dc0

File tree

8 files changed

+30
-28
lines changed

8 files changed

+30
-28
lines changed

alloc/src/collections/btree/map.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ use super::node::{self, marker, ForceResult::*, Handle, NodeRef, Root};
1616
use super::search::SearchResult::*;
1717

1818
mod entry;
19+
20+
#[stable(feature = "rust1", since = "1.0.0")]
1921
pub use entry::{Entry, OccupiedEntry, OccupiedError, VacantEntry};
22+
2023
use Entry::*;
2124

2225
/// Minimum number of elements in a node that is not a root.

core/src/iter/adapters/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ mod take;
2424
mod take_while;
2525
mod zip;
2626

27+
#[stable(feature = "rust1", since = "1.0.0")]
2728
pub use self::{
2829
chain::Chain, cycle::Cycle, enumerate::Enumerate, filter::Filter, filter_map::FilterMap,
2930
flatten::FlatMap, fuse::Fuse, inspect::Inspect, map::Map, peekable::Peekable, rev::Rev,

core/src/iter/sources.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod repeat;
66
mod repeat_with;
77
mod successors;
88

9+
#[stable(feature = "rust1", since = "1.0.0")]
910
pub use self::repeat::{repeat, Repeat};
1011

1112
#[stable(feature = "iter_empty", since = "1.2.0")]

core/src/iter/traits/mod.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ mod exact_size;
55
mod iterator;
66
mod marker;
77

8-
pub use self::accum::{Product, Sum};
9-
pub use self::collect::{Extend, FromIterator, IntoIterator};
10-
pub use self::double_ended::DoubleEndedIterator;
11-
pub use self::exact_size::ExactSizeIterator;
128
#[stable(feature = "rust1", since = "1.0.0")]
13-
pub use self::iterator::Iterator;
9+
pub use self::{
10+
accum::{Product, Sum},
11+
collect::{Extend, FromIterator, IntoIterator},
12+
double_ended::DoubleEndedIterator,
13+
exact_size::ExactSizeIterator,
14+
iterator::Iterator,
15+
marker::{FusedIterator, TrustedLen},
16+
};
17+
1418
#[unstable(issue = "none", feature = "inplace_iteration")]
1519
pub use self::marker::InPlaceIterable;
1620
#[unstable(feature = "trusted_step", issue = "85731")]
1721
pub use self::marker::TrustedStep;
18-
#[stable(feature = "rust1", since = "1.0.0")]
19-
pub use self::marker::{FusedIterator, TrustedLen};

std/src/io/buffered/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ use crate::error;
1212
use crate::fmt;
1313
use crate::io::Error;
1414

15-
pub use bufreader::BufReader;
16-
pub use bufwriter::BufWriter;
15+
#[stable(feature = "rust1", since = "1.0.0")]
16+
pub use self::{bufreader::BufReader, bufwriter::BufWriter, linewriter::LineWriter};
17+
use linewritershim::LineWriterShim;
18+
1719
#[stable(feature = "bufwriter_into_parts", since = "1.56.0")]
1820
pub use bufwriter::WriterPanicked;
19-
pub use linewriter::LineWriter;
20-
use linewritershim::LineWriterShim;
2121

2222
/// An error returned by [`BufWriter::into_inner`] which combines an error that
2323
/// happened while writing out the buffer, and the buffered writer object

std/src/io/mod.rs

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -261,31 +261,24 @@ use crate::str;
261261
use crate::sys;
262262
use crate::sys_common::memchr;
263263

264-
#[stable(feature = "rust1", since = "1.0.0")]
265-
pub use self::buffered::IntoInnerError;
266264
#[stable(feature = "bufwriter_into_parts", since = "1.56.0")]
267265
pub use self::buffered::WriterPanicked;
268-
#[stable(feature = "rust1", since = "1.0.0")]
269-
pub use self::buffered::{BufReader, BufWriter, LineWriter};
270-
#[stable(feature = "rust1", since = "1.0.0")]
271-
pub use self::copy::copy;
272-
#[stable(feature = "rust1", since = "1.0.0")]
273-
pub use self::cursor::Cursor;
274-
#[stable(feature = "rust1", since = "1.0.0")]
275-
pub use self::error::{Error, ErrorKind, Result};
276266
#[unstable(feature = "internal_output_capture", issue = "none")]
277267
#[doc(no_inline, hidden)]
278268
pub use self::stdio::set_output_capture;
279-
#[stable(feature = "rust1", since = "1.0.0")]
280-
pub use self::stdio::{stderr, stdin, stdout, Stderr, Stdin, Stdout};
281-
#[unstable(feature = "stdio_locked", issue = "86845")]
282-
pub use self::stdio::{stderr_locked, stdin_locked, stdout_locked};
283-
#[stable(feature = "rust1", since = "1.0.0")]
284-
pub use self::stdio::{StderrLock, StdinLock, StdoutLock};
285269
#[unstable(feature = "print_internals", issue = "none")]
286270
pub use self::stdio::{_eprint, _print};
271+
#[unstable(feature = "stdio_locked", issue = "86845")]
272+
pub use self::stdio::{stderr_locked, stdin_locked, stdout_locked};
287273
#[stable(feature = "rust1", since = "1.0.0")]
288-
pub use self::util::{empty, repeat, sink, Empty, Repeat, Sink};
274+
pub use self::{
275+
buffered::{BufReader, BufWriter, IntoInnerError, LineWriter},
276+
copy::copy,
277+
cursor::Cursor,
278+
error::{Error, ErrorKind, Result},
279+
stdio::{stderr, stdin, stdout, Stderr, StderrLock, Stdin, StdinLock, Stdout, StdoutLock},
280+
util::{empty, repeat, sink, Empty, Repeat, Sink},
281+
};
289282

290283
#[unstable(feature = "read_buf", issue = "78485")]
291284
pub use self::readbuf::ReadBuf;

std/src/os/linux/raw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ mod arch {
239239
target_arch = "riscv32"
240240
))]
241241
mod arch {
242+
#[stable(feature = "raw_ext", since = "1.1.0")]
242243
pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
243244
}
244245

std/src/os/unix/io/raw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
33
#![stable(feature = "rust1", since = "1.0.0")]
44

5+
#[stable(feature = "rust1", since = "1.0.0")]
56
pub use crate::os::fd::raw::*;

0 commit comments

Comments
 (0)