This adds explanation of inherited references and how they relate to the default binding mode.
Co-authored-by: Nadrieril <Nadrieril@users.noreply.github.com>
I believe this variant name was used incorrectly. The timeline is roughly:
* `FileName::cfg_spec_source_code` was added in
https://github.com/rust-lang/rust/pull/54517. However, it used
`FileName::Quote` instead of `FileName::CfgSpec` which I believe was a
mistake.
* Quote stuff was removed in
https://github.com/rust-lang/rust/pull/51285, but did not remove
`FileName::Quote`.
* `FileName::CfgSpec` was removed in
https://github.com/rust-lang/rust/pull/116474 because it was unused.
This restores it so that the `--cfg` variant uses a name that makes more
sense with how it is used, and restores what I think is the original
intent.
Revert most of #133194 (except the test and the comment fixes). Then refix
not emitting locations at all when the correct location discriminator value
exceeds LLVM's capacity.
Fix dev guide docs for error-pattern
I know it would have made more sense to make this PR to the dev guide repo but I had already made the fix before I realized that.
r? `@jieyouxu`
Don't skip argument parsing when running `rustc` with no arguments
Setting up the argument parser to parse no arguments is a tiny bit of wasted work, but avoids an otherwise-unnecessary special case, in a scenario (printing a help message and quitting) where perf at this scale really doesn't matter anyway.
In particular, this lets us avoid having to deal with multiple different APIs to determine whether the compiler is nightly or not.
---
This special-case handling for rustc with no arguments is very very old (long predating 1.0), and used to be much simpler, without any need to set up boolean values to handle various conditional cases. So I don't think it was ever explicitly decided that having this special case was worth the extra complexity; it just started out simple and accumulated complexity over time.
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure
the commit has to download precompiled rustc artifact from CI, which was leading builds to
fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project
source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on
git-managed source and read `git-commit-hash` file otherwise.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Improve `select_nth_unstable` documentation clarity
* Instead uses `before` and `after` variable names in the example
where `greater` and `lesser` are flipped.
* Uses `<=` and `>=` instead of "less than or equal to" and "greater
than or equal to" to make the docs more concise.
* General attempt to remove unnecessary words and be more precise. For
example it seems slightly wrong to say "its final sorted position",
since this implies there is only one sorted position for this element.
Setting up the argument parser to parse no arguments is a tiny bit of wasted
work, but avoids an otherwise-unnecessary special case.
In particular, this lets us avoid having to deal with multiple different APIs
to determine whether the compiler is nightly or not.
Some random compiler nits
The only "observable" change here is using `par_body_owners` for coroutine witnesses/coroutine obligation checking.
r? lqd (or reassign, you just seem to like to approve prs :3 )
Disallow `A { .. }` if `A` has no fields
```
error: `A` has no fields, `..` needs at least one default field in the struct definition
--> $DIR/empty-struct.rs:16:17
|
LL | let _ = A { .. };
| - ^^
| |
| this type has no fields
```
[rustdoc] Replace module list items `ul`/`li` with `dl`/`dd`/`dt` elements
`@hywan` suggested that rustdoc should use `dl`,`dt` and `dd` HTML tags for listing items on module pages as it matches better what this is (an item and optionally its description). This is a very good idea so here is the implementation.
Also nice side-effect of this change: it reduces a bit the generated HTML since we go from:
This PR shouldn't impact page appearance.
```html
<ul class="item-table">
<li>
<div class="item-name">NAME</div>
<div class="desc docblock-short">THE DOC</div>
</li>
</ul>
```
to:
```html
<dl class="item-table">
<dt>NAME</dt>
<dd>THE DOC</dd>
</dl>
```
You can test it [here](https://rustdoc.crud.net/imperio/items-list/std/index.html).
r? `@notriddle`
Rollup of 6 pull requests
Successful merges:
- #135616 (CI: split i686-msvc job to two free runners)
- #135623 (ci: use ghcr ubuntu image for mingw-check-tidy)
- #135640 (Drop MIPS glibc 2.23 patches that reside in crosstool-ng now)
- #135663 (Fix ICE in resolving associated items as non-bindings)
- #135680 (coverage: Clean up a few things after the counters overhaul)
- #135697 (Get rid of `ToPolyTraitRef`)
r? `@ghost`
`@rustbot` modify labels: rollup
Get rid of `ToPolyTraitRef`
It's generally a footgun, since it throws away `PredicatePolarity`.
This PR doesn't attempt to fix any related bugs having to do with binders or polarity; it just tries to pass through `TraitPredicate`s around instead of `TraitRef`s. There should be basically no functional changes.