Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #76019

Merged
merged 30 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a8de713
Improve rendering of crate features via doc(cfg)
Nemo157 Aug 9, 2020
234ec95
Render longhand multiple crate/target features nicer
Nemo157 Aug 9, 2020
3328bd9
Add long cfg description to tooltip on short description
Nemo157 Aug 18, 2020
511ee05
Use intra-doc links in `core::macros`
camelid Aug 25, 2020
c73d4cd
Clean up E0761 explanation
GuillaumeGomez Aug 26, 2020
0cca597
Fix potential UB in align_offset docs
elichai Aug 26, 2020
16d8d4b
Error use explicit intra-doc link and fix text
pickfire Aug 26, 2020
9ea4593
Use [xxx()] rather than the [xxx] function
pickfire Aug 26, 2020
39f5ebc
Fix typo in `std::hint::black_box` docs
aticu Aug 26, 2020
ed9df28
Fix ICE due to carriage return w/ multibyte char
JulianKnodt Aug 27, 2020
3a814f3
Reduce duplicate doc link in error
pickfire Aug 27, 2020
df975cf
Rename rustdoc/test -> rustdoc/doctest
matklad Aug 27, 2020
c933d69
Use intra-doc links in `core::future::future`
camelid Aug 26, 2020
707298d
Use intra-doc links in `core::num::dec2flt`
camelid Aug 26, 2020
65b37ce
fix wording in release notes
tinaun Aug 27, 2020
dd96996
Add InstrProfilingPlatformFuchsia.c to profiler_builtins
richkadel Aug 27, 2020
55cd243
Adds --bless support to test/run-make-fulldeps
richkadel Aug 27, 2020
39cd184
Remove unnecessary intra-doc link
camelid Aug 28, 2020
8730c2b
Rollup merge of #75330 - Nemo157:improve-doc-cfg-features, r=Guillaum…
pietroalbini Aug 28, 2020
521b205
Rollup merge of #75927 - camelid:intra-doc-links-for-core-macros, r=j…
pietroalbini Aug 28, 2020
bc55313
Rollup merge of #75941 - GuillaumeGomez:cleanup-e0761, r=Dylan-DPC
pietroalbini Aug 28, 2020
be1b304
Rollup merge of #75943 - elichai:2020-align_offset-docs, r=RalfJung
pietroalbini Aug 28, 2020
cbe3aef
Rollup merge of #75946 - pickfire:patch-8, r=jyn514
pietroalbini Aug 28, 2020
e027b57
Rollup merge of #75955 - camelid:intra-doc-links-for-future-and-dec2f…
pietroalbini Aug 28, 2020
0f1ffa8
Rollup merge of #75967 - aticu:blackbox_typo, r=Dylan-DPC
pietroalbini Aug 28, 2020
cd77b62
Rollup merge of #75972 - JulianKnodt:i70381, r=rollup
pietroalbini Aug 28, 2020
efd81b4
Rollup merge of #75989 - matklad:renamerustdoctest, r=GuillaumeGomez
pietroalbini Aug 28, 2020
730c68e
Rollup merge of #75996 - tinaun:patch-2, r=jonas-schievink
pietroalbini Aug 28, 2020
35496c2
Rollup merge of #75998 - richkadel:llvm-coverage-map-gen-6b.1, r=wesl…
pietroalbini Aug 28, 2020
0106ad4
Rollup merge of #76000 - richkadel:llvm-coverage-map-gen-6b.2, r=wesl…
pietroalbini Aug 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Compatibility Notes
-------------------
- [The target configuration option `abi_blacklist` has been renamed
to `unsupported_abis`.][74150] The old name will still continue to work.
- [Rustc will now warn if you have a C-like enum that implements `Drop`.][72331]
- [Rustc will now warn if you cast a C-like enum that implements `Drop`.][72331]
This was previously accepted but will become a hard error in a future release.
- [Rustc will fail to compile if you have a struct with
`#[repr(i128)]` or `#[repr(u128)]`.][74109] This representation is currently only
Expand Down
10 changes: 4 additions & 6 deletions library/core/src/future/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::task::{Context, Poll};
/// When using a future, you generally won't call `poll` directly, but instead
/// `.await` the value.
///
/// [`Waker`]: ../task/struct.Waker.html
/// [`Waker`]: crate::task::Waker
#[doc(spotlight)]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[stable(feature = "futures_api", since = "1.36.0")]
Expand Down Expand Up @@ -91,11 +91,9 @@ pub trait Future {
/// (memory corruption, incorrect use of `unsafe` functions, or the like),
/// regardless of the future's state.
///
/// [`Poll::Pending`]: ../task/enum.Poll.html#variant.Pending
/// [`Poll::Ready(val)`]: ../task/enum.Poll.html#variant.Ready
/// [`Context`]: ../task/struct.Context.html
/// [`Waker`]: ../task/struct.Waker.html
/// [`Waker::wake`]: ../task/struct.Waker.html#method.wake
/// [`Poll::Ready(val)`]: Poll::Ready
/// [`Waker`]: crate::task::Waker
/// [`Waker::wake`]: crate::task::Waker::wake
#[lang = "poll"]
#[stable(feature = "futures_api", since = "1.36.0")]
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub fn spin_loop() {
/// [`std::convert::identity`]: https://doc.rust-lang.org/core/convert/fn.identity.html
///
/// Unlike [`std::convert::identity`], a Rust compiler is encouraged to assume that `black_box` can
/// use `x` in any possible valid way that Rust code is allowed to without introducing undefined
/// use `dummy` in any possible valid way that Rust code is allowed to without introducing undefined
/// behavior in the calling code. This property makes `black_box` useful for writing code in which
/// certain optimizations are not desired, such as benchmarks.
///
Expand Down
10 changes: 5 additions & 5 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,16 @@ macro_rules! r#try {
/// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
/// formatted according to the specified format string and the result will be passed to the writer.
/// The writer may be any value with a `write_fmt` method; generally this comes from an
/// implementation of either the [`std::fmt::Write`] or the [`std::io::Write`] trait. The macro
/// returns whatever the `write_fmt` method returns; commonly a [`std::fmt::Result`], or an
/// implementation of either the [`fmt::Write`] or the [`io::Write`] trait. The macro
/// returns whatever the `write_fmt` method returns; commonly a [`fmt::Result`], or an
/// [`io::Result`].
///
/// See [`std::fmt`] for more information on the format string syntax.
///
/// [`std::fmt`]: crate::fmt
/// [`std::fmt::Write`]: crate::fmt::Write
/// [`std::io::Write`]: ../std/io/trait.Write.html
/// [`std::fmt::Result`]: crate::fmt::Result
/// [`fmt::Write`]: crate::fmt::Write
/// [`io::Write`]: ../std/io/trait.Write.html
/// [`fmt::Result`]: crate::fmt::Result
/// [`io::Result`]: ../std/io/type.Result.html
///
/// # Examples
Expand Down
16 changes: 8 additions & 8 deletions library/core/src/macros/panic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ to the caller of the program. `panic!` should be used when a program reaches
an unrecoverable state.

This macro is the perfect way to assert conditions in example code and in
tests. `panic!` is closely tied with the `unwrap` method of both [`Option`]
and [`Result`][runwrap] enums. Both implementations call `panic!` when they are set
to None or Err variants.
tests. `panic!` is closely tied with the `unwrap` method of both
[`Option`][ounwrap] and [`Result`][runwrap] enums. Both implementations call
`panic!` when they are set to [`None`] or [`Err`] variants.

This macro is used to inject panic into a Rust thread, causing the thread to
panic entirely. Each thread's panic can be reaped as the `Box<Any>` type,
panic entirely. Each thread's panic can be reaped as the [`Box`]`<`[`Any`]`>` type,
and the single-argument form of the `panic!` macro will be the value which
is transmitted.

Expand All @@ -24,11 +24,11 @@ The multi-argument form of this macro panics with a string and has the

See also the macro [`compile_error!`], for raising errors during compilation.

[runwrap]: ../std/result/enum.Result.html#method.unwrap
[`Option`]: ../std/option/enum.Option.html#method.unwrap
[`Result`]: ../std/result/enum.Result.html
[ounwrap]: Option::unwrap
[runwrap]: Result::unwrap
[`Box`]: ../std/boxed/struct.Box.html
[`Any`]: crate::any::Any
[`format!`]: ../std/macro.format.html
[`compile_error!`]: ../std/macro.compile_error.html
[book]: ../book/ch09-00-error-handling.html

# Current implementation
Expand Down
4 changes: 0 additions & 4 deletions library/core/src/num/dec2flt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ from_str_float_impl!(f64);
///
/// This error is used as the error type for the [`FromStr`] implementation
/// for [`f32`] and [`f64`].
///
/// [`FromStr`]: ../str/trait.FromStr.html
/// [`f32`]: ../../std/primitive.f32.html
/// [`f64`]: ../../std/primitive.f64.html
#[derive(Debug, Clone, PartialEq, Eq)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseFloatError {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ impl<T: ?Sized> *const T {
/// # use std::mem::align_of;
/// # unsafe {
/// let x = [5u8, 6u8, 7u8, 8u8, 9u8];
/// let ptr = &x[n] as *const u8;
/// let ptr = x.as_ptr().add(n) as *const u8;
/// let offset = ptr.align_offset(align_of::<u16>());
/// if offset < x.len() - n - 1 {
/// let u16_ptr = ptr.add(offset) as *const u16;
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ impl<T: ?Sized> *mut T {
/// # use std::mem::align_of;
/// # unsafe {
/// let x = [5u8, 6u8, 7u8, 8u8, 9u8];
/// let ptr = &x[n] as *const u8;
/// let ptr = x.as_ptr().add(n) as *const u8;
/// let offset = ptr.align_offset(align_of::<u16>());
/// if offset < x.len() - n - 1 {
/// let u16_ptr = ptr.add(offset) as *const u16;
Expand Down
1 change: 1 addition & 0 deletions library/profiler_builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fn main() {
"InstrProfilingMergeFile.c",
"InstrProfilingNameVar.c",
"InstrProfilingPlatformDarwin.c",
"InstrProfilingPlatformFuchsia.c",
"InstrProfilingPlatformLinux.c",
"InstrProfilingPlatformOther.c",
"InstrProfilingPlatformWindows.c",
Expand Down
17 changes: 7 additions & 10 deletions library/std/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ use crate::string;
/// themselves through the [`Display`] and [`Debug`] traits, and may provide
/// cause chain information:
///
/// The [`source`] method is generally used when errors cross "abstraction
/// boundaries". If one module must report an error that is caused by an error
/// from a lower-level module, it can allow access to that error via the
/// [`source`] method. This makes it possible for the high-level module to
/// provide its own errors while also revealing some of the implementation for
/// debugging via [`source`] chains.
/// [`Error::source()`] is generally used when errors cross
/// "abstraction boundaries". If one module must report an error that is caused
/// by an error from a lower-level module, it can allow accessing that error
/// via [`Error::source()`]. This makes it possible for the high-level
/// module to provide its own errors while also revealing some of the
/// implementation for debugging via `source` chains.
///
/// [`Result<T, E>`]: Result
/// [`source`]: Error::source
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Error: Debug + Display {
/// The lower-level source of this error, if any.
Expand Down Expand Up @@ -636,7 +635,7 @@ impl dyn Error {
}

/// Returns an iterator starting with the current error and continuing with
/// recursively calling [`source`].
/// recursively calling [`Error::source`].
///
/// If you want to omit the current error and only use its sources,
/// use `skip(1)`.
Expand Down Expand Up @@ -686,8 +685,6 @@ impl dyn Error {
/// assert!(iter.next().is_none());
/// assert!(iter.next().is_none());
/// ```
///
/// [`source`]: Error::source
#[unstable(feature = "error_iter", issue = "58520")]
#[inline]
pub fn chain(&self) -> Chain<'_> {
Expand Down
10 changes: 3 additions & 7 deletions src/librustc_error_codes/error_codes/E0761.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@ Multiple candidate files were found for an out-of-line module.

Erroneous code example:

```rust
```ignore (multiple source files required for compile_fail)
// file: ambiguous_module/mod.rs

fn foo() {}
```

```rust
// file: ambiguous_module.rs

fn foo() {}
```

```ignore (multiple source files required for compile_fail)
// file: lib.rs

mod ambiguous_module; // error: file for module `ambiguous_module`
// found at both ambiguous_module.rs and
// ambiguous_module.rs/mod.rs

fn main() {}
```

Please remove this ambiguity by deleting/renaming one of the candidate files.
2 changes: 1 addition & 1 deletion src/librustc_parse_format/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ fn find_skips_from_snippet(
(' ' | '\n' | '\t', _) if eat_ws => {
skips.push(pos);
}
('\\', Some((next_pos, 'n' | 't' | '0' | '\\' | '\'' | '\"'))) => {
('\\', Some((next_pos, 'n' | 't' | 'r' | '0' | '\\' | '\'' | '\"'))) => {
skips.push(*next_pos);
let _ = s.next();
}
Expand Down
Loading