about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-18Remove unneeded `unknown` variable and `Symbol` creation when iterating over ↵Guillaume Gomez-4/+4
items in rustdoc rendering
2023-11-18Auto merge of #118046 - TaKO8Ki:rollup-6jdgwe5, r=TaKO8Kibors-364/+604
Rollup of 5 pull requests Successful merges: - #116750 (Add Seek::seek_relative) - #117110 (Suggest field typo through derefs) - #117961 (Add `x suggest` entries for testing `mir-opt` and `coverage`) - #118020 (Fix links to `From<{OwnedHandle, OwnedFd}> for std::process::Child{Stdin, Stdout, Stderr}` in 1.74 release notes) - #118034 (bump few deps to fix unsoundness and drop few dup deps) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-18Auto merge of #11826 - kpreid:typo, r=Alexendoobors-8/+13
Fix typos in recent lint documentation. Fixes typos and markup errors, and also makes the examples more realistic by hiding the `;`s so as not to visibly be discarding the computed value. Affected lints: * `redundant_as_str` * `unnecessary_map_on_constructor` changelog: none
2023-11-19Rollup merge of #118034 - klensy:dep-up-18-11-23, r=Mark-SimulacrumTakayuki Maeda-104/+41
bump few deps to fix unsoundness and drop few dup deps jsondocck: bump jsonpath to 0.3, dropping few dup dependencies changes: https://github.com/freestrings/jsonpath/compare/v0.2.6...v0.3.0 self_cell: bump to 0.10.3 due to RUSTSEC-2023-0070 https://rustsec.org/advisories/RUSTSEC-2023-0070.html https://github.com/Voultapher/self_cell/issues/49 bump h2 to 0.3.22, dropping few dup crate versions https://github.com/hyperium/h2/blob/v0.3.22/CHANGELOG.md
2023-11-19Rollup merge of #118020 - Lireer:patch-1, r=Mark-SimulacrumTakayuki Maeda-2/+2
Fix links to `From<{OwnedHandle, OwnedFd}> for std::process::Child{Stdin, Stdout, Stderr}` in 1.74 release notes
2023-11-19Rollup merge of #117961 - Zalathar:suggest, r=Mark-SimulacrumTakayuki Maeda-17/+30
Add `x suggest` entries for testing `mir-opt` and `coverage` The `x suggest` subcommand uses git to find paths that have been modified, and uses those paths to suggest relevant test suites to run. This PR adds suggestions for `x test mir-opt` and `x test coverage` .
2023-11-19Rollup merge of #117110 - estebank:deref-field-suggestion, r=b-naberTakayuki Maeda-241/+491
Suggest field typo through derefs Take into account implicit dereferences when suggesting fields. ``` error[E0609]: no field `longname` on type `Arc<S>` --> $DIR/suggest-field-through-deref.rs:10:15 | LL | let _ = x.longname; | ^^^^^^^^ help: a field with a similar name exists: `long_name` ``` CC https://github.com/rust-lang/rust/issues/78374#issuecomment-719564114
2023-11-19Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-SimulacrumTakayuki Maeda-0/+40
Add Seek::seek_relative The `BufReader` struct has a `seek_relative` method because its `Seek::seek` implementation involved dumping the internal buffer (https://github.com/rust-lang/rust/issues/31100). Unfortunately, there isn't really a good way to take advantage of that method in generic code. This PR adds the same method to the main `Seek` trait with the straightforward default method, and an override for `BufReader` that calls its implementation. _Also discussed in [this](https://internals.rust-lang.org/t/add-seek-seek-relative/19546) internals.rust-lang.org thread._
2023-11-18Remove space and rephrase `map()` advice.Kevin Reid-3/+3
2023-11-18Fix CIAntoni Boucher-10/+19
2023-11-18Auto merge of #118002 - nnethercote:unify-input-no-input, r=bjorn3bors-109/+80
Unify "input" and "no input" paths in `run_compiler` A follow-up to #117649. r? `@bjorn3`
2023-11-18Update patch disabling portable-simdAntoni Boucher-16/+24
2023-11-18Auto merge of #3175 - RalfJung:sysroot-verbose, r=RalfJungbors-5/+14
cargo-miri: when verbose, print where the sysroot is being built Fixes https://github.com/rust-lang/miri/issues/3169
2023-11-18cargo-miri: when verbose, print where the sysroot is being builtRalf Jung-5/+14
2023-11-18Auto merge of #118037 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 2c03e0e2dcd05dd064fcf10cc1050d342eaf67e3..9765a449d9b7341c2b49b88da41c2268ea599720 2023-11-16 04:21:44 +0000 to 2023-11-17 20:58:23 +0000 - refactor(toml): Clean up workspace inheritance (rust-lang/cargo#12971) - docs: Recommend a wider selection of libsecret-compatible password managers (rust-lang/cargo#12993) - feat(cli): add color output for `cargo --list` (rust-lang/cargo#12992) - refactor: log when loading config from file (rust-lang/cargo#12991) - Link to rustc lint levels (rust-lang/cargo#12990) - chore(ci): Catch naive use of AtomicU64 early (rust-lang/cargo#12988) - cargo-credential-1password: Add missing `--account` argument to `op signin` command (rust-lang/cargo#12985) - chore: dogfood Cargo `-Zlints` table feature (rust-lang/cargo#12178) - cargo-credential-1password: Fix README (rust-lang/cargo#12986) - Fix a rustflags test using a wrong buildfile name (rust-lang/cargo#12987) - Fix some test output validation. (rust-lang/cargo#12982) r? ghost
2023-11-18Update cargoWeihang Lo-0/+0
2023-11-18[`missing_asserts_for_indexing`]: accept len equality checksy21-6/+99
2023-11-18Unify passing of flags to rustdocJakub Beránek-24/+26
2023-11-18Don't suggest `a.mul_add(b, c)` if parameters are not floatLukas Lueg-2/+42
clippy::suboptimal_flops used to not check if the second parameter to f32/f64.mul_add() was float. Since the method is only defined to take `Self` as paremters, the suggestion was wrong. Fixes #11831
2023-11-18Auto merge of #117525 - GKFX:remove_option_payload_ptr, r=petrochenkovbors-171/+16
Remove option_payload_ptr; redundant to offset_of The `option_payload_ptr` intrinsic is no longer required as `offset_of` supports traversing enums (#114208). This PR removes it in order to dogfood offset_of (as suggested at https://github.com/rust-lang/rust/issues/106655#issuecomment-1790907626). However, it will not build until those changes reach beta (which I think is within the next 8 days?) so I've opened it as a draft.
2023-11-18Update --check-cfg tests that had old --cfg warningUrgau-83/+28
2023-11-18Remove --check-cfg checking of --cfg argsUrgau-47/+4
2023-11-18Update based on petrochenkov's reviewGeorge Bateman-3/+4
2023-11-18Auto merge of #117924 - estebank:issue-53841, r=petrochenkovbors-0/+22
When a local binding shadows a fn, point at fn def in call failure When a local binding shadows a function that is then called, this local binding will cause an E0618 error. We now point not only at the binding definition, but also at the locally defined function of the same name. ``` error[E0618]: expected function, found `&str` --> $DIR/issue-22468.rs:3:13 | LL | let foo = "bar"; | --- `foo` has type `&str` LL | let x = foo("baz"); | ^^^------- | | | call expression requires function ... LL | fn foo(file: &str) -> bool { | -------------------------- this function of the same name is available here, but it shadowed by the local binding of the same name ``` Fix #53841
2023-11-18jsondocck: bump jsonpath to 0.3, dropping few dup dependenciesklensy-104/+41
changes: https://github.com/freestrings/jsonpath/compare/v0.2.6...v0.3.0 self_cell: bump to 0.10.3 due to RUSTSEC-2023-0070 https://rustsec.org/advisories/RUSTSEC-2023-0070.html https://github.com/Voultapher/self_cell/issues/49 bump h2 to 0.3.22, dropping few dup crate versions https://github.com/hyperium/h2/blob/v0.3.22/CHANGELOG.md
2023-11-18Auto merge of #115412 - eswartz:docs/total_cmp-test-result-in-docs, r=scottmcmbors-6/+22
Expose tests for {f32,f64}.total_cmp in docs Expose tests for {f32,f64}.total_cmp in docs Uncomment the helpful `assert_eq!` line, which is stripped out completely in docs, and leaves the reader to mentally play through the algorithm, or go to the playground and add a println!, to see what the result will be. (If these tests are known to fail on some platforms, is there some mechanism to conditionalize this or escape the test so the `assert_eq!` source will be visible on the web? I am a newbie, which is why I was reading docs ;)
2023-11-18guarantee that char and u32 are ABI-compatibleRalf Jung-5/+19
2023-11-18Auto merge of #3174 - RalfJung:rustc-git, r=RalfJungbors-1/+1
miri script: fix RUSTC_GIT error message Making this a flag is tricky since our command-line parsing is pretty crude. Fixes https://github.com/rust-lang/miri/issues/3173
2023-11-18miri script: fix RUSTC_GIT error messageRalf Jung-1/+1
2023-11-18Auto merge of #115249 - clarfonthey:alignment, r=scottmcmbors-1/+44
impl more traits for ptr::Alignment, add mask method Changes: * Adds `rustc_const_unstable` attributes where missing * Makes `log2` method const * Adds `mask` method * Implements `Default`, which is equivalent to `Alignment::MIN` No longer included in PR: * Removes indirection of `AlignmentEnum` type alias (this was intentional) * Implements `Display`, `Binary`, `Octal`, `LowerHex`, and `UpperHex` (should go through libs-api instead) * Controversially implements `LowerExp` and `UpperExp` using `p` instead of `e` to indicate a power of 2 (also should go through libs-api) Tracking issue for `ptr::Alignment`: #102070
2023-11-18impl more traits for ptr::Alignment, add mask methodltdk-1/+44
2023-11-18Auto merge of #117825 - fee1-dead-contrib:corefx, r=petrochenkovbors-2/+23
Reenable effects in libcore With #116670, #117531, and #117171, I think we would be comfortable with re-enabling the effects feature for more testing in libcore. r? `@oli-obk` cc `@fmease` cc #110395
2023-11-18Auto merge of #117742 - ↵bors-17/+219
weiznich:turn_overlapping_diagnostic_options_into_warnings, r=compiler-errors Add some additional warnings for duplicated diagnostic items This commit adds warnings if a user supplies several diagnostic options where we can only apply one of them. We explicitly warn about ignored options here. In addition a small test for these warnings is added. r? `@compiler-errors` For now that's the last PR to improve the warnings generated by misused `#[diagnostic::on_unimplemented]` attributes. I'm not sure what needs to be done next to move this closer to stabilization.
2023-11-17rustdoc-search: fix accidental shared, mutable mapMichael Howell-30/+49
2023-11-17rustdoc-search: fast path for 1-query unificationMichael Howell-2/+76
Short queries, in addition to being common, are also the base case for a lot of more complicated queries. We can avoid most of the backtracking data structures, and use simple recursive matching instead, by special casing them. Profile output: https://notriddle.com/rustdoc-html-demo-5/profile-3/index.html
2023-11-17rustdoc-search: less new Maps in unifyFunctionTypeMichael Howell-16/+31
This is a major source of expense on generic queries, and this commit reduces them. Profile output: https://notriddle.com/rustdoc-html-demo-5/profile-2/index.html
2023-11-18Auto merge of #117138 - zachs18:rwlock_guard_debug_unsized, r=dtolnaybors-2/+2
Add T: ?Sized to `RwLockReadGuard` and `RwLockWriteGuard`'s Debug impls. For context, `MutexGuard` has `+ ?Sized` on its `Debug` impl, and all three have `+ ?Sized` on their `Display` impls. It looks like the `?Sized` was just missed when the impls were added (the impl for `MutexGuard` was added in the same PR (https://github.com/rust-lang/rust/pull/38006) with support for `T: Debug + ?Sized`, and `RwLock*Guard`s did allow `T: ?Sized` types already); the `Display` impls were added later (https://github.com/rust-lang/rust/pull/42822) with support for `T: Debug + ?Sized` types. I think this needs a T-libs-api FCP? I'm not sure if this also needs an ACP. If so I can make one. These are changes to (stable) trait impls on stable types so will be insta-stable. `@rustbot` label +T-libs-api
2023-11-17Document behavior of `<dyn Any as Any>::type_id()`Jules Bertholet-0/+5
See also #57893
2023-11-18tweak logic of "unknown field" labelEsteban Küber-49/+101
2023-11-18Begin nightly-ifying rustc_type_irMichael Goulet-102/+214
2023-11-17Use u8xN for bitmasksCaleb Zulawski-56/+14
2023-11-18When a local binding shadows a fn, point at fn def in call failureEsteban Küber-0/+22
When a local binding shadows a function that is then called, this local binding will cause an E0618 error. We now point not only at the binding definition, but also at the locally defined function of the same name. ``` error[E0618]: expected function, found `&str` --> $DIR/issue-22468.rs:3:13 | LL | let foo = "bar"; | --- `foo` has type `&str` LL | let x = foo("baz"); | ^^^------- | | | call expression requires function ... LL | fn foo(file: &str) -> bool { | -------------------------- this function of the same name is avalable here, but it shadowed by the local binding of the same name ``` Fix #53841
2023-11-17Auto merge of #118023 - matthiaskrgr:rollup-i9skwic, r=matthiaskrgrbors-304/+644
Rollup of 7 pull requests Successful merges: - #117338 (Remove asmjs) - #117549 (Use `copied` instead of manual `map`) - #117745 (Emit smir) - #117964 (When using existing fn as module, don't claim it doesn't exist) - #118006 (clarify `fn discriminant` guarantees: only free lifetimes may get erased) - #118016 (Add stable mir members to triagebot config) - #118022 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-17Merge branch 'master' into sync_from_rust_2023_11_17Antoni Boucher-19/+65
2023-11-17Rollup merge of #118022 - saethlin:miri, r=saethlinMatthias Krüger-138/+252
Miri subtree update
2023-11-17Rollup merge of #118016 - celinval:main, r=compiler-errorsMatthias Krüger-0/+9
Add stable mir members to triagebot config I also added the two crates from the project to `[assign.owners]` so it automatically assign to a project member changes to those crates.
2023-11-17Rollup merge of #118006 - lcnr:discriminant-docs, r=compiler-errorsMatthias Krüger-4/+6
clarify `fn discriminant` guarantees: only free lifetimes may get erased cc https://github.com/rust-lang/rust/pull/104299/files#r1397082347 don't think this necessitates a backport by itself, but should imo be included if one were to exist. r? types
2023-11-17Rollup merge of #117964 - estebank:issue-81232, r=petrochenkovMatthias Krüger-4/+16
When using existing fn as module, don't claim it doesn't exist Tweak wording of module not found in resolve, when the name exists but belongs to a non-`mod` item. Fix #81232.
2023-11-17Rollup merge of #117745 - ouz-a:emit_smir, r=celinvalMatthias Krüger-9/+340
Emit smir This adds ability to `-Zunpretty=smir` and get smir output of a Rust file, this is obliviously pretty basic compared to `mir` output but I think we could iteratively improve it, and even at this state this is useful for us. r? ``@celinval``
2023-11-17Rollup merge of #117549 - DaniPopes:more-copied, r=b-naberMatthias Krüger-11/+10
Use `copied` instead of manual `map`