Commit Graph

241632 Commits

Author SHA1 Message Date
bors
5151b8c427 Auto merge of #119039 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-12-17 10:18:25 +00:00
bohan
64e311add2 skip rpit constraint check if borrowck return type error 2023-12-17 16:49:00 +08:00
bors
9f13b9d9ca Auto merge of #119000 - celinval:smir-cstr, r=ouz-a
Add a method to StableMIR to check if a type is a CStr

Also add a check that StableMIR works properly with C string literal.
2023-12-17 08:18:17 +00:00
bors
00a82a5f3c Auto merge of #3229 - saethlin:protector-gc-ice, r=RalfJung
Visit the AllocIds and BorTags in borrow state FrameExtra

Fixes https://github.com/rust-lang/miri/issues/3228

I said

> The obvious way would be to visit the AllocIds in borrow_tracker::FrameExtra in the GC.

Since I have had no new ideas, that's what this does.
2023-12-17 07:58:17 +00:00
onur-ozkan
81b98a0a13 expand helpers tests with new test module tests/helpers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-17 10:31:04 +03:00
bors
2f19122f73 Auto merge of #119001 - notriddle:notriddle/searchwords, r=GuillaumeGomez
rustdoc-search: remove parallel searchWords array

This might have made sense if the algorithm could use `searchWords` to skip having to look at `searchIndex`, but since it always does a substring check on both the stock word and the normalizedName, it doesn't seem to help performance anyway.

Profile: http://notriddle.com/rustdoc-html-demo-8/searchwords/index.html
2023-12-17 06:20:49 +00:00
bors
5e7025419d Auto merge of #118830 - GuillaumeGomez:env-tracked_env, r=Nilstrieb
Add support for `--env` on `tracked_env::var`

Follow-up of https://github.com/rust-lang/rust/pull/118368.
Part of Part of https://github.com/rust-lang/rust/issues/80792.

It adds support of the `--env` option for proc-macros through `tracked_env::var`.

r? `@Nilstrieb`
2023-12-17 04:23:08 +00:00
bors
9022e6a39c Auto merge of #119011 - Zalathar:assert-not, r=est31
coverage: Regression test for `assert!(!false)`

This verifies that #118904 has already been fixed by #118198.

---

`@rustbot` label +A-code-coverage
2023-12-17 01:29:59 +00:00
bors
445177724a Auto merge of #117595 - jyn514:x-clippy, r=albertlarsan68
x clippy

thanks to `@asquared31415` `@albertlarsan68` for all their help, most of this pr is their work

note that this also adds x clippy --stage 0 -Awarnings to x86_64-gnu-llvm-15 to make sure it stays working; that won't gate on any clippy warnings, just enforce that clippy doesn't give a hard error. we can't add --stage 1 until clippy fixes its debug assertions not to panic.

note that `x clippy --stage 1` currently breaks when combined with download-rustc.

unlike the previous prs, this doesn't require changes to clippy (it works by using RUSTC_WRAPPER instead), and supports stage 0

read this commit-by-commit

closes https://github.com/rust-lang/rust/pull/107628; see also https://github.com/rust-lang/rust/pull/106394, https://github.com/rust-lang/rust/pull/97443. fixes https://github.com/rust-lang/rust/issues/95988. helps with https://github.com/rust-lang/rust/issues/76495.

r? bootstrap
2023-12-16 20:52:36 +00:00
Joshua Nelson
a078c3aea8 test x clippy --stage 0 in ci 2023-12-16 15:24:59 -05:00
Albert Larsan
9288954789 Update stage0.json
you can replicate this commit with `./x.py run bump-stage0 --args 2023-11-13`
2023-12-16 15:24:59 -05:00
asquared31415
9341325c73 make x.py clippy download and use beta clippy 2023-12-16 15:24:59 -05:00
jyn
2979a2c72d use RUSTC_WRAPPER instead of RUSTC 2023-12-16 15:24:37 -05:00
jyn
336ed0ebc7 give a better error if renaming a temp file fails 2023-12-16 15:09:20 -05:00
Rémy Rakic
8560c67e4c describe unstable linker flavors in the unstable book 2023-12-16 20:02:22 +00:00
Rémy Rakic
968d40066c remove unstable linker flavors from stable documentation 2023-12-16 20:01:11 +00:00
bors
02ad6676dd Auto merge of #110494 - majaha:noTrapAfterNoreturn, r=nikic
Use the LLVM option NoTrapAfterNoreturn

Use this LLVM option: https://llvm.org/doxygen/classllvm_1_1TargetOptions.html#acd83fce25de1ac9f6c975135a8235c22 when TrapUnreachable is enabled. This prevents codegenning unnecessary double-traps in some situations.

See further discussion here: https://github.com/rust-lang/compiler-team/issues/618
2023-12-16 18:55:01 +00:00
Michael Goulet
20927d3956 Remove unnecessary constness from ProjectionCandidate 2023-12-16 17:21:20 +00:00
onur-ozkan
3ea3c3885b create helper fn hex_encode and remove hex dependency
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-16 20:16:53 +03:00
Ben Kimock
ce4f57511e Visit the AllocIds and BorTags in borrow state FrameExtra 2023-12-16 11:56:42 -05:00
jyn
0ffac661fa fix printing cargo args on --dry-run 2023-12-16 11:16:14 -05:00
bors
e223c41028 Auto merge of #119013 - flip1995:clippy-subtree-sync, r=Manishearth
Clippy subtree update

r? `@matthiaskrgr` (As Manish wrote that he is a bit inactive until the new year)
2023-12-16 14:49:59 +00:00
Philipp Krones
b92ab506d3
Update Cargo.lock 2023-12-16 14:13:12 +01:00
Philipp Krones
61f4a73c67
Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup 2023-12-16 14:12:50 +01:00
bors
a859e5cc1c Auto merge of #11971 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-12-16 13:02:49 +00:00
Philipp Krones
71f48ee39b
Bump nightly version -> 2023-12-16 2023-12-16 14:00:13 +01:00
Philipp Krones
80ccd6392f
Merge remote-tracking branch 'upstream/master' into rustup 2023-12-16 13:59:56 +01:00
Zalathar
bc77717d68 coverage: Regression test for assert!(!false) 2023-12-16 20:58:04 +11:00
bors
3ad8e2d129 Auto merge of #118897 - nnethercote:more-unescaping-cleanups, r=fee1-dead
More unescaping cleanups

More minor improvements I found while working on #118699.

r? `@fee1-dead`
2023-12-16 08:52:06 +00:00
bors
1c6a06183a Auto merge of #119009 - workingjubilee:rollup-ytexy6j, r=workingjubilee
Rollup of 6 pull requests

Successful merges:

 - #118523 (Add ASCII whitespace trimming functions to `&str`)
 - #118851 ([std] Add xcoff in object's feature list)
 - #118989 (Simplify lint decorator derive too)
 - #118993 (use `if cfg!` instead of `#[cfg]`)
 - #119003 (NFC: do not clone types that are copy)
 - #119004 (NFC don't convert types to identical types)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-16 05:35:12 +00:00
Jubilee
c5a3d98cc6
Rollup merge of #119004 - matthiaskrgr:conv, r=compiler-errors
NFC don't convert types to identical types
2023-12-15 21:33:00 -08:00
Jubilee
c9ba4583aa
Rollup merge of #119003 - matthiaskrgr:nein_clone, r=Nadrieril
NFC: do not clone types that are copy
2023-12-15 21:33:00 -08:00
Jubilee
30231d9afa
Rollup merge of #118993 - jyn514:cfg-color, r=WaffleLapkin,Nilstrieb
use `if cfg!` instead of `#[cfg]`

this pr is specifically for waffle because i love it <3

fixes https://github.com/rust-lang/rust/pull/118756#discussion_r1421767649

r? `@WaffleLapkin`
2023-12-15 21:32:59 -08:00
Jubilee
c7b492eac1
Rollup merge of #118989 - compiler-errors:lint-decorator-2, r=WaffleLapkin
Simplify lint decorator derive too

See last commit, since this is stacked on top of #118727.

r? WaffleLapkin
2023-12-15 21:32:58 -08:00
Jubilee
6c2f00fbd7
Rollup merge of #118851 - bzEq:std-xcoff, r=Mark-Simulacrum
[std] Add xcoff in object's feature list

object-0.32.0 has supported XCOFF format. And backtrace in submodule has been updated to support XCOFF and AIX. Add `xcoff` to supported feature list to make backtrace built on AIX.
2023-12-15 21:32:58 -08:00
Jubilee
15e84ebc7b
Rollup merge of #118523 - okaneco:trim_ascii, r=Mark-Simulacrum
Add ASCII whitespace trimming functions to `&str`

- Add `trim_ascii_start`, `trim_ascii_end`, and `trim_ascii` functions to `&str` for trimming ASCII whitespace
- Add `#[inline]` to `[u8]` `trim_ascii` functions

These functions are feature-gated by `#![feature(byte_slice_trim_ascii)]` #94035
2023-12-15 21:32:57 -08:00
bors
5c927ab999 Auto merge of #117984 - compiler-errors:implied-bounds-entailment, r=lcnr
Make `IMPLIED_BOUNDS_ENTAILMENT` into a hard error from a lint

closes #105572

Removes the `IMPLIED_BOUNDS_ENTAILMENT` and makes the `compare_method_predicate_entailment` logic just run once.

r? lcnr
2023-12-16 02:20:30 +00:00
Michael Goulet
108bec6723 Simplify lint decorator derive too 2023-12-16 02:07:01 +00:00
Michael Goulet
32907c72eb Remove the lint outright 2023-12-16 01:28:06 +00:00
Michael Goulet
629d3511b7 Make IMPLIED_BOUNDS_ENTAILMENT into a hard error from a lint 2023-12-16 01:28:05 +00:00
Zalathar
e0de143970 coverage: Regression test for markers in a function with no spans 2023-12-16 11:10:11 +11:00
Zalathar
c57f28bbf7 coverage: Avoid creating func_coverage for marker statements
Coverage marker statements should have no effect on codegen, but in some cases
they could have the side-effect of creating a `func_coverage` entry for their
enclosing function. That can lead to an ICE for functions that don't actually
have any coverage spans.
2023-12-16 11:10:11 +11:00
Zalathar
dfa6441354 coverage: Skip instrumenting a function if no spans were extracted 2023-12-16 11:10:10 +11:00
Michael Howell
6b69ebcae0 rustdoc-search: remove parallel searchWords array
This might have made sense if the algorithm could use `searchWords`
to skip having to look at `searchIndex`, but since it always
does a substring check on both the stock word and the normalizedName,
it doesn't seem to help performance anyway.
2023-12-15 16:26:35 -07:00
Matthias Krüger
8479945c08 NFC don't convert types to identical types 2023-12-15 23:56:24 +01:00
Matthias Krüger
74d81d15b4 NFC: do not clone types that are copy 2023-12-15 23:19:51 +01:00
bors
ca5c68a110 Auto merge of #119002 - workingjubilee:rollup-dbfet7s, r=workingjubilee
Rollup of 5 pull requests

Successful merges:

 - #118396 (Collect lang items from AST, get rid of `GenericBound::LangItemTrait`)
 - #118727 (Don't pass lint back out of lint decorator)
 - #118956 (Make CStr documentation consistent ("nul" instead of "null"))
 - #118981 (Remove an unneeded allocation)
 - #118998 (Link to is_benchmark from the Ipv6Addr::is_global documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-15 22:09:47 +00:00
Jubilee
4b447b8bb7
Rollup merge of #118998 - jstasiak:improve-doc, r=workingjubilee
Link to is_benchmark from the Ipv6Addr::is_global documentation

All other relevant is_* methods are mentioned in the list of addresses here, is_benchmarking has been the only one missing.
2023-12-15 14:08:18 -08:00
Jubilee
3d94fc9dfe
Rollup merge of #118981 - krtab:onelessalloc, r=compiler-errors
Remove an unneeded allocation

This removes an unneeded allocation in `<&[hir::GenericParam<'_>] as NextTypeParamName>::next_type_param_name`
2023-12-15 14:08:17 -08:00
Jubilee
5e85fece3a
Rollup merge of #118956 - danielhuang:patch-2, r=workingjubilee
Make CStr documentation consistent ("nul" instead of "null")

"nul" is used in method names and appears more often in the documentation than "null", so make all instances "nul" to keep it consistent.
2023-12-15 14:08:16 -08:00