| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495).
Co-Authored-By: Sebastian Malton <sebastian@malton.name>
|
|
Const-stabilize `const_int_ops` + `const_ip`
r? @oli-obk
## Note for relnotes: This PR includes https://github.com/rust-lang/rust/pull/57105.
I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment.
## Stable APIs proposed for constification
+ `const_int_ops`:
+ `count_ones`
+ `count_zeros`
+ `leading_zeros`
+ `trailing_zeros`
+ `swap_bytes`
+ `from_be`
+ `from_le`
+ `to_be`
+ `to_le`
+ `const_ip`
+ `Ipv4Addr::new`
## Unstable APIs constified
+ `const_int_conversion`:
+ `reverse_bits`
|
|
|
|
Fixes #57512.
|
|
use the correct supertrait substitution in `object_ty_for_trait`
beta-nominating because regression.
Fixes #57156.
|
|
|
|
|
|
Co-authored-by: Alexander Regueiro <alexreg@me.com>
|
|
|
|
Also, don't suggest comparing to zero for non-numeric expressions.
|
|
Include the kind of the binding that we're suggesting, and use a
structured suggestion.
|
|
|
|
|
|
|
|
|
|
|
|
check missing docs for reexported macros as well
Fixes #56334.
|
|
Use a structured suggestion and tighten the span to just the identifier.
|
|
Use a structured suggestion and tighten the span to just the identifier.
|
|
Use a structured suggestion and tighten the span to just the identifier.
|
|
stabilize cfg_attr_multi
Stabilizes cfg_attr_multi feature
Related to #54881
Will add the lint in a seperate PR
r? @Centril
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #57290 (remove outdated comment)
- #57308 (Make CompileController thread-safe)
- #57358 (use utf-8 throughout htmldocck)
- #57369 (Provide the option to use libc++ even on all platforms)
- #57375 (Add duration constants)
- #57403 (Make extern ref HTTPS)
Failed merges:
- #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)
r? @ghost
|
|
use utf-8 throughout htmldocck
This commit improves compatibility with Python 3, which already uses
Unicode throughout.
It also fixes a subtle incompatibility stemming from the use of
`entitydefs`, which contains replacement text _encoded in latin-1_ for
HTML entities. When using Python 3, this would cause `0xa0` to be
incorrectly added to the element tree.
This meant that there was a rustdoc test that would pass under Python 2
but fail under Python 3, due to an incorrect regex match against the
non-breaking space character. This commit triggers that failure in both
versions, and also fixes it.
|
|
NLL: Fix bug in associated constant type annotations.
Fixes #57280.
This PR reverses the variance used when relating types from the type
annotation of an associated constant - this matches the behaviour of the
lexical borrow checker and fixes a bug whereby matching a `&'a str`
against a `&'static str` would produce an error.
r? @nikomatsakis
|
|
tests: Do not use `-Z parse-only`, continue compilation to test recovery
Make tests closer to reality!
The next step will be enabling `-Z continue-parse-after-error` by default and looking at the regressions.
A few instances of `-Z parse-only` are kept when it's appropriate, see e.g `ui/impl-trait/impl-trait-plus-priority.rs`, which tests mostly semantically wrong code and would generate too much useless noise if allowed to continue.
|
|
privacy: Fix regression in impl reachability
Rollback to pre-https://github.com/rust-lang/rust/pull/56878 logic of determining reachability.
`reachability(impl Trait<Substs> for Type<Substs>) = reachability(Trait & Type)`, substs are ignored.
Fixes https://github.com/rust-lang/rust/issues/57264
|
|
|
|
|
|
Make sure feature gate errors are recoverable (take 2)
Continuation of https://github.com/rust-lang/rust/pull/56999/commits/15cefe4b2a65bb2a4febcd353cb37b90dfafa4f1.
Turns out I missed the most important part - the main feature gate checking pass.
|
|
|
|
|
|
use structured suggestion for method calls
Furthermore, don't suggest calling the method if it is part of a place
expression, as this is invalid syntax.
I'm thinking it might be worth putting a label on the method assignment span like "this is a method" and removing the span from the "methods are immutable" text so it isn't reported twice.
The suggestions in `src/test/ui/did_you_mean/issue-40396.stderr` are suboptimal. I could check if the containing expression is `BinOp`, but I'm not sure if that's general enough. Any ideas?
r? @estebank
|
|
This commit improves compatibility with Python 3, which already uses
Unicode throughout.
It also fixes a subtle incompatibility stemming from the use of
`entitydefs`, which contains replacement text _encoded in latin-1_ for
HTML entities. When using Python 3, this would cause `0xa0` to be
incorrectly added to the element tree.
This meant that there was a rustdoc test that would pass under Python 2
but fail under Python 3, due to an incorrect regex match against the
non-breaking space character. This commit triggers that failure in both
versions, and also fixes it.
|
|
bootstrap: Link LLVM as a dylib with ThinLTO (take 2)
When building a distributed compiler on Linux where we use ThinLTO to
create the LLVM shared object this commit switches the compiler to
dynamically linking that LLVM artifact instead of statically linking to
LLVM. The primary goal here is to reduce CI compile times, avoiding two+
ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll
reuse the one ThinLTO step done by LLVM's build itself.
Lots of discussion about this change can be found [here] and down. A
perf run will show whether this is worth it or not!
[here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
---
This PR previously landed in https://github.com/rust-lang/rust/pull/56944, caused https://github.com/rust-lang/rust/issues/57111, and was reverted in https://github.com/rust-lang/rust/pull/57116. I've added one more commit here which should fix the breakage that we saw.
|
|
Modify mismatched type error for functions with no return
Fix #50009.
```
error[E0308]: mismatched types
--> $DIR/coercion-missing-tail-expected-type.rs:3:24
|
LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
| -------- ^^^ expected i32, found ()
| |
| this function's body doesn't return
LL | x + 1;
| - help: consider removing this semicolon
|
= note: expected type `i32`
found type `()`
```
instead of
```
error[E0308]: mismatched types
--> $DIR/coercion-missing-tail-expected-type.rs:3:28
|
LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types
| ____________________________^
LL | | x + 1;
| | - help: consider removing this semicolon
LL | | }
| |_^ expected i32, found ()
|
= note: expected type `i32`
found type `()`
```
|
|
|
|
|
|
Rollup of 17 pull requests
Successful merges:
- #57219 (Remove some unused code)
- #57229 (Fix #56806 by using `delay_span_bug` in object safety layout sanity checks)
- #57233 (Rename and fix nolink-with-link-args test)
- #57238 (Fix backtraces for inlined functions on Windows)
- #57249 (Fix broken links to second edition TRPL.)
- #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT)
- #57273 (Update the stdsimd submodule)
- #57278 (Add Clippy to config.toml.example)
- #57295 (Fix 'be be' constructs)
- #57311 (VaList::copy should not require a mutable ref)
- #57312 (`const fn` is no longer coming soon (const keyword docs))
- #57313 (Improve Box<T> -> Pin<Box<T>> conversion)
- #57314 (Fix repeated word typos)
- #57326 (Doc rewording, use the same name `writer`)
- #57338 (rustdoc: force binary filename for compiled doctests)
- #57342 (librustc_mir: Make qualify_min_const_fn module public)
- #57343 (Calculate privacy access only via query)
Failed merges:
- #57340 (Use correct tracking issue for c_variadic)
r? @ghost
|
|
Fixes #57156.
|
|
rustdoc: force binary filename for compiled doctests
Fixes https://github.com/rust-lang/rust/issues/57317, needed for https://github.com/rust-lang/rust-by-example/issues/1137
Right now, when building a doctest, rustdoc provides the compiler an output directory (a temp dir) but lets the compiler name the executable. If the doctest needs to be executed, it then tries to run a binary named `rust_out` from that directory. For the most part, this works fine. However, if the doctest sets its own crate name, the compiler uses that name for the output binary instead. This causes rustdoc to try to execute a nonexistent binary, causing the test to fail.
This PR changes the paths rustdoc gives to the compiler when building doctests to force the output *filename* instead of just the *directory*.
|
|
Fix repeated word typos
Inspired by #57295 (I skipped 'be be' because of it) and my [PR in another repo
](https://github.com/e-maxx-eng/e-maxx-eng/pull/389)
Not a stupid `sed`, I actually tried to fix case by case.
|
|
Fix broken links to second edition TRPL.
Fixes https://github.com/rust-lang/rust/issues/57104.
Remove `second-edition/` from TRPL hyperlinks.
|
|
Rename and fix nolink-with-link-args test
There are three problems with the nolink-with-link-args test:
* The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in #46291.
* In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](https://github.com/rust-lang/rust/pull/12826).
* Pattern has a small typo.
At first I was going to completely remove this test, but there is [a closed pull request for that](https://github.com/rust-lang/rust/pull/21090).
So:
* rename the file as suggested in the closed PR
* adjust the comment
* fix typo in the pattern
* add `ignore-msvc`.
r? @alexcrichton
|