ivmarkov
fa6db4c428
Fix ESP IDF build broken by #124210
2024-04-29 06:17:02 +00:00
Nicholas Nethercote
f3e05d1609
Remove extern crate rustc_data_structures
from rustc_query_system
.
2024-04-29 15:40:29 +10:00
J-ZhengLi
cbdc36aa09
skip warning when generic evolved;
...
suggest explicit type when its inferred in closure
2024-04-29 13:38:45 +08:00
Nicholas Nethercote
99e036bd21
Remove extern crate rustc_middle
from numerous crates.
2024-04-29 14:50:45 +10:00
Martin Nordholts
de3eff79a6
aux-bin: Avoid old .so files from old tests; clean auxiliary dir root
2024-04-29 06:50:38 +02:00
Martin Nordholts
448d527fd8
Typo fix: exec:ing -> exec'ing
2024-04-29 06:49:39 +02:00
Nicholas Nethercote
e6b3e20243
Remove extern crate rustc_session
from rustc_lint
.
2024-04-29 13:57:41 +10:00
bors
5b1d58c9e2
Auto merge of #124502 - NCGThompson:statically-known-docs, r=jhpratt
...
Update `is_val_statically_known` Docs
* Add `Type Requirements` section, listing the allowed inputs, as requested by #121115
* Add `Pointers` subsection, explaining is_val_statically_known handles pointers.
* Add `Stability concerns` section, referring to other documentation relating to consistency in `const` functions.
Fixes #121115
Sorry this took so long.
2024-04-29 03:00:12 +00:00
Gurinder Singh
254a9fbe86
Prohibit const prop of unions in KnownPanicsLint
...
as they have a potential to ICE during layout calculation
2024-04-29 08:16:26 +05:30
Nicholas Nethercote
6ce258f657
Remove extern crate rustc_macros
from rustc_middle
.
2024-04-29 11:19:16 +10:00
Nicholas Thompson
5969ad4cae
Update is_val_statically_known docs
...
* Add `Type Requirements` section, listing the allowed inputs, as requested by #121115
* Add `Pointers` subsection, explaining is_val_statically_known handles pointers.
* Add `Stability concerns` section, referring to other documentation relating to consistency in `const` functions.
2024-04-28 21:00:53 -04:00
Nicholas Nethercote
4814fd0a4b
Remove extern crate rustc_macros
from numerous crates.
2024-04-29 10:21:54 +10:00
bors
5fe8b697e7
Auto merge of #124498 - tgross35:stabilize-non_null_convenience, r=jhpratt
...
Stabilize `non_null_convenience`
Fully stabilize the following API, including const where applicable:
```rust
impl <T> NonNull<T> {
pub const unsafe fn offset(self, count: isize) -> Self;
pub const unsafe fn add(self, count: usize) -> Self;
pub const unsafe fn sub(self, count: usize) -> Self;
pub const unsafe fn offset_from(self, origin: NonNull<T>) -> isize;
pub const unsafe fn read(self) -> T;
pub unsafe fn read_volatile(self) -> T;
pub const unsafe fn read_unaligned(self) -> T;
pub unsafe fn write_volatile(self, val: T);
pub unsafe fn replace(self, src: T) -> T;
}
impl<T: ?Sized> NonNull<T> {
pub const unsafe fn byte_offset(self, count: isize) -> Self;
pub const unsafe fn byte_add(self, count: usize) -> Self;
pub const unsafe fn byte_sub(self, count: usize) -> Self;
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: NonNull<U>) -> isize;
pub unsafe fn drop_in_place(self);
}
```
Stabilize the following without const:
```rust
impl <T> NonNull<T> {
// const under `const_intrinsic_copy`
pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize);
pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize);
pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize);
pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize);
// const under `const_ptr_write`
pub const unsafe fn write(self, val: T);
pub const unsafe fn write_bytes(self, val: u8, count: usize);
pub const unsafe fn write_unaligned(self, val: T);
// const under `const_swap`
pub const unsafe fn swap(self, with: NonNull<T>);
// const under `const_align_offset`
pub const fn align_offset(self, align: usize) -> usize;
// const under `const_pointer_is_aligned`
pub const fn is_aligned(self) -> bool;
}
```
Left the following unstable:
```rust
impl <T> NonNull<T> {
// moved gate to `ptr_sub_ptr`
pub const unsafe fn sub_ptr(self, subtracted: NonNull<T>) -> usize;
}
impl <T: ?Sized> NonNull<T> {
// moved gate to `pointer_is_aligned_to`
pub const fn is_aligned_to(self, align: usize) -> bool;
}
```
Fixes: https://github.com/rust-lang/rust/issues/117691
2024-04-29 00:05:30 +00:00
bors
1fffb2a355
Auto merge of #124431 - chenyukang:yukang-fix-rustdoc-124363, r=Nadrieril
...
Fix the assertion crash from rustdoc document indent widths
Fixes #124363
2024-04-28 21:20:07 +00:00
Trevor Gross
e0f8202ed5
Stabilize non_null_convenience
...
Fully stabilize the following API, including const where applicable:
impl <T> NonNull<T> {
pub const unsafe fn offset(self, count: isize) -> Self;
pub const unsafe fn add(self, count: usize) -> Self;
pub const unsafe fn sub(self, count: usize) -> Self;
pub const unsafe fn offset_from(self, origin: NonNull<T>) -> isize;
pub const unsafe fn read(self) -> T;
pub unsafe fn read_volatile(self) -> T;
pub const unsafe fn read_unaligned(self) -> T;
pub unsafe fn write_volatile(self, val: T);
pub unsafe fn replace(self, src: T) -> T;
}
impl<T: ?Sized> NonNull<T> {
pub const unsafe fn byte_offset(self, count: isize) -> Self;
pub const unsafe fn byte_add(self, count: usize) -> Self;
pub const unsafe fn byte_sub(self, count: usize) -> Self;
pub const unsafe fn byte_offset_from<U: ?Sized>(self, origin: NonNull<U>) -> isize;
pub unsafe fn drop_in_place(self);
}
Stabilize the following without const:
impl <T> NonNull<T> {
// const under `const_intrinsic_copy`
pub const unsafe fn copy_to(self, dest: NonNull<T>, count: usize);
pub const unsafe fn copy_to_nonoverlapping(self, dest: NonNull<T>, count: usize);
pub const unsafe fn copy_from(self, src: NonNull<T>, count: usize);
pub const unsafe fn copy_from_nonoverlapping(self, src: NonNull<T>, count: usize);
// const under `const_ptr_write`
pub const unsafe fn write(self, val: T);
pub const unsafe fn write_bytes(self, val: u8, count: usize);
pub const unsafe fn write_unaligned(self, val: T);
// const under `const_swap`
pub const unsafe fn swap(self, with: NonNull<T>);
// const under `const_align_offset`
pub const fn align_offset(self, align: usize) -> usize;
// const under `const_pointer_is_aligned`
pub const fn is_aligned(self) -> bool;
}
Left the following unstable:
impl <T> NonNull<T> {
// moved gate to `ptr_sub_ptr`
pub const unsafe fn sub_ptr(self, subtracted: NonNull<T>) -> usize;
}
impl <T: ?Sized> NonNull<T> {
// moved gate to `pointer_is_aligned_to`
pub const fn is_aligned_to(self, align: usize) -> bool;
}
Fixes: https://github.com/rust-lang/rust/issues/117691
2024-04-28 16:19:53 -05:00
George Bateman
8aa3c59752
Move rustfmt changes out
...
Now in https://github.com/rust-lang/rustfmt/pull/6154
2024-04-28 21:38:55 +01:00
Mads Marquart
f9f3573b62
Fix posix_spawn not being used on iOS and visionOS
...
`man posix_spawn` documents it to be able to return `ENOENT`, and there
should be nothing preventing this. Tested in the iOS simulator and on
Mac Catalyst.
2024-04-28 22:34:51 +02:00
bors
e68fcb0973
Auto merge of #12725 - llogiq:allow-useless-test-vecs, r=blyxyas
...
configurably allow `useless_vec` in tests
This adds a `àllow-useless-vec-in-test` configuration which, when set to `true` will allow the `useless_vec` lint in `#[test]` functions and code within `#[cfg(test)]`. It also moves a `is_in_test` helper to `clippy_utils`.
---
changelog: configurably allow [`useless_vec`] in test code
2024-04-28 20:10:33 +00:00
George Bateman
2348eb271c
Update mir-opt tests, add proper regression test
2024-04-28 21:10:09 +01:00
Andre Bogus
87efce4fa2
configurably allow useless_vec
in tests
...
This adds a `àllow-useless-vec-in-test` configuration which, when set
to `true` will allow the `useless_vec` lint in `#[test]` functions and
code within `#[cfg(test)]`. It also moves a `is_in_test` helper to
`clippy_utils`.
2024-04-28 22:07:56 +02:00
Mads Marquart
6b488cd302
Also raise fd limit on tvOS when testing
2024-04-28 21:31:00 +02:00
Mads Marquart
214d588a5b
Fix va_list on watchOS and visionOS
2024-04-28 21:30:40 +02:00
est31
4284bca720
Add a note to the ArbitraryExpressionInPattern error
2024-04-28 21:27:26 +02:00
bors
10505a1cc9
Auto merge of #124489 - matthiaskrgr:rollup-7pa86bf, r=matthiaskrgr
...
Rollup of 2 pull requests
Successful merges:
- #123734 (Inline more svg images into CSS)
- #124473 (Port `print-cfg` run-make test to Rust-based rmake.rs)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-28 19:16:32 +00:00
Mads Marquart
a6d9da6b2a
Fix SIGEMT and SIGINFO parsing on watchOS and visionOS
2024-04-28 21:10:32 +02:00
Mads Marquart
79c6d91966
Fix available_parallelism on watchOS and visionOS
...
Both `sysconf` and `_SC_NPROCESSORS_ONLN` is available on all Apple platforms.
2024-04-28 21:10:32 +02:00
Matthias Krüger
6edb721a9d
Rollup merge of #124473 - Urgau:port-print-cfg, r=jieyouxu
...
Port `print-cfg` run-make test to Rust-based rmake.rs
This PR port the `print-cfg` run-make test to Rust-based rmake.rs tests.
The actual test is now split in two:
- the first part for the `--print=cfg` part
- and the second part for the `=PATH` part of `--print`
Part of #121876 .
r? `@jieyouxu`
2024-04-28 21:02:59 +02:00
Matthias Krüger
1b567de50a
Rollup merge of #123734 - GuillaumeGomez:inline-svg-into-css, r=notriddle
...
Inline more svg images into CSS
Follow-up of https://github.com/rust-lang/rust/pull/123706 .
r? `@notriddle`
2024-04-28 21:02:58 +02:00
Aneesh Kadiyala
e2861d5652
Encourage using LateLintPass
2024-04-29 00:30:23 +05:30
bors
ca1ddc0e7c
Auto merge of #12722 - MATSMACKE:master, r=Alexendoo
...
Fix false positive in `cast_possible_truncation`
Fixes [#12721 ](https://github.com/rust-lang/rust-clippy/issues/12721 )
changelog: [`cast_possible_truncation`]: Separated checking whether integer constant has sufficient leading zeroes to be safely casted when getting remainder from bitwise and, since the latter allows a constant on either side of the operator to increase the number of leading zeroes that can be guaranteed.
2024-04-28 17:53:03 +00:00
George Bateman
ca79086c87
Fix #124478 - offset_of! returns a temporary
...
This was due to the must_use() call. Adding HIR's OffsetOf to the must_use
checking within the compiler avoids this issue.
2024-04-28 18:36:08 +01:00
Mads Marquart
d9c0eb8084
Use target_vendor = "apple"
instead of target_os = "..."
2024-04-28 18:22:37 +02:00
bors
a18f50fe6a
Auto merge of #12728 - y21:rr, r=dswij
...
Add myself back to review rotation
changelog: none
2024-04-28 15:45:33 +00:00
Guillaume Gomez
5a3509c2f4
Add some missing comments to describe what the inlined SVG is
2024-04-28 17:23:12 +02:00
Guillaume Gomez
f780913c72
Inline wheel.svg
into CSS
2024-04-28 17:23:12 +02:00
Guillaume Gomez
f5b3b400f7
Inline clipboard.svg
into CSS
2024-04-28 17:23:11 +02:00
Urgau
006c94cfa1
Use named struct arguments instead of comment named args
2024-04-28 17:17:22 +02:00
Urgau
607497d57c
Port print-cfg run-make to Rust-based rmake.rs
2024-04-28 17:17:22 +02:00
Mats Macke
0b1f09e6f7
Fixed reduction of & in cast_possible_truncation
...
Fixed formatting
Added tests for issue #12721
Checking for reduction on RHS
2024-04-28 16:01:33 +02:00
George Bateman
a0a84429a5
Remove direct dependencies on lazy_static, once_cell and byteorder
...
The functionality of all three crates is now available in the standard library.
2024-04-28 14:35:00 +01:00
y21
ef1b0210bd
remove myself from vacation
2024-04-28 15:13:41 +02:00
bors
ce609db948
Auto merge of #124467 - matthiaskrgr:rollup-1aq98fu, r=matthiaskrgr
...
Rollup of 2 pull requests
Successful merges:
- #124444 (Record certainty of `evaluate_added_goals_and_make_canonical_response` call in candidate)
- #124463 (Rename `inhibit_union_abi_opt()` to `inhibits_union_abi_opt()`)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-28 13:05:18 +00:00
Matthias Krüger
7ab3997970
Rollup merge of #124463 - gurry:rename-func, r=TaKO8Ki
...
Rename `inhibit_union_abi_opt()` to `inhibits_union_abi_opt()`
`inihibit` seems to suggest that this function will inhibit optimizations whereas `inhibits` correctly indicates that it will merely _check_ that. With `inhibits` if conditions read more naturally e.g.:
```rust
if repr.inhibits_union_abi_opt() {
}
```
2024-04-28 13:34:42 +02:00
Matthias Krüger
a7771385e5
Rollup merge of #124444 - compiler-errors:eval, r=lcnr
...
Record certainty of `evaluate_added_goals_and_make_canonical_response` call in candidate
Naming subject to bikeshedding, but I will need this when moving `select` to a proof tree visitor.
r? lcnr
2024-04-28 13:34:41 +02:00
bors
ba00750418
Auto merge of #124435 - matthiaskrgr:tests, r=jieyouxu
...
add more tests
r? `@jieyouxu`
2024-04-28 10:55:16 +00:00
Matthias Krüger
a15996c9f1
try to fix tests on windows where the "file not found" error is different from linux
2024-04-28 11:07:00 +02:00
bors
91d5e4af86
Auto merge of #124261 - onur-ozkan:drop-llvm-if-available, r=Mark-Simulacrum
...
drop deprecated value `if-available` for `download-ci-llvm` option
It's been 5 months since we deprecated this. It should be fine to drop its support now.
2024-04-28 08:52:27 +00:00
Matthias Krüger
f536a06a5a
add test for ice expected-type-of-closure-body-to-be-a-closure-or-coroutine-ice-113776.stderr
...
Fixes https://github.com/rust-lang/rust/issues/113776
2024-04-28 10:23:11 +02:00
Matthias Krüger
27338f2fe0
add test for ice future has no bound vars.
...
Fixes https://github.com/rust-lang/rust/issues/112347
2024-04-28 10:23:11 +02:00
Matthias Krüger
bb4769532b
add test for const generic ty's with lifetimes cause opaque types to ICE
...
Fixes https://github.com/rust-lang/rust/issues/111911
2024-04-28 10:23:11 +02:00