This is very useful when the RwLock is synchronizing access to a data
structure and you would like to return or store guards which contain
references to data inside the data structure instead of the data structure
itself.
WIP implementation of #31209.
The goal is to insert fake/dummy definitions for names that we failed to import so that later resolver stages won't complain about them.
Something went haywire with github last night and the old PR https://github.com/rust-lang/rust/pull/31230 got closed somehow. This new PR is to replace the old one. This incorporates all of the feedback from the other PR.
@alexcrichton I incorporated the suggestion from @semarie and the result is cleaner and clearer. I think this is ready to go.
This mirrors the behavior of `clang-cl.exe` by adding a `CodeView` global
variable when emitting debug information. This should in turn help stack traces
that are generated when code is compiled with debuginfo enabled.
Closes#28133
This is a behavior that some find confusing, so it deserves its own example.
Fixes#31318
I think this wording might be a bit strange, but I couldn't come up with anything better. Feedback very welcome.
Fixes#31098
AFAICT this is the only place where rustdoc explicitly checks if we are on stable before emitting content, so I can't tell if this is the sane way to handle this, or if anything else should be done to make sure that nobody forgets to remove this check when `const` is stabilized.
Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.
This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.
Fixes#27489.
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the
`target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the
`powerpc64le` target does indeed set the `target_arch` as `powerpc64le`,
causing a bit of inconsistency between theset two.
As these are just the same instance of one instruction set, let's use
`target_endian` to switch between them and only set the `target_arch` as one
value. This should cut down on the number of `#[cfg]` annotations necessary and
all around be a little more ergonomic.
Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.
Some other shufflings as well:
* Three powerpc triples for Linux have been added recently
* An armv7 linux triple was added recently
* The 64-bit Solaris triple is now mentioned in tier 3
We are currently now also building nightlies for iOS, powerpc triples, and
armv7, but there hasn't been much vetting of the triples themselves so I've left
them in tier 3 for now.