about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-03-10Rollup merge of #108930 - Ezrashaw:better-error-for-manual-fn-impl, ↵Matthias Krüger-51/+142
r=petrochenkov feat: implement better error for manual impl of `Fn*` traits Fixes #39259 cc `@estebank` (you gave me some advice in the linked issue, would you like to review?)
2023-03-10Rollup merge of #108900 - bvanjoi:issue-108275, r=petrochenkovMatthias Krüger-10/+40
fix(lexer): print whitespace warning for \x0c - close https://github.com/rust-lang/rust/issues/108275 - discussion: https://github.com/rust-lang/rust/pull/108403
2023-03-10Rollup merge of #108834 - compiler-errors:fn-ptr-fn-obl, r=spastorinoMatthias Krüger-3/+44
Do not ICE when we have fn pointer `Fn` obligations with bound vars in the self type We never supported solving `for<'a> fn(&'a ()): Fn(&'a ())` -- I tried to add that support in #104929, but iirc `@lcnr` wanted to support this more generally by eagerly instantiating trait predicate binders with placeholders. That never happened due to blockers in the old solver, but we probably shouldn't ICE in any case. On the bright side, this passes on the new solver :^)
2023-03-10Rollup merge of #108828 - compiler-errors:new-solver-alias-eq-on-num-var, r=lcnrMatthias Krüger-40/+143
Emit alias-eq when equating numeric var and projection This doesn't fix everything having to do with projections and infer vars, but it does fix a common case I saw in HIR typeck. r? `@lcnr`
2023-03-10Rollup merge of #106921 - madsmtm:cell-memory-layout, r=dtolnayMatthias Krüger-0/+6
Add documentation about the memory layout of `Cell` https://github.com/rust-lang/rust/pull/101717 guaranteed the memory layout of `UnsafeCell<T>`. This property (a guaranteed memory layout) can be useful to have on `Cell<T>` as well. (Note that `Cell<u8>` [already doesn't trigger the `improper_ctypes` lint](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=34af59ef60b96d8a8bdaec1d52cb5420) since it is `#[repr(transparent)]`). The concrete use-case is for the crate [`objc2`](https://github.com/madsmtm/objc2) to specify that `Cell<T>` is safe to use as an instance variable when `T` is. Fixes https://github.com/rust-lang/rust/issues/79303. --- I'm unsure if we should specify less, for example say that the `Cell` may have extra restrictions on when it may be accessed, or if that's implicit in the (deliberately minimal) way I've worded it here?
2023-03-10Moved thread_local implementation to sys::commonAyush Singh-731/+723
This allows removing all the platform-dependent code from `library/std/src/thread/local.rs` and `library/std/src/thread/mod.rs` Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10Add note when matching token with nonterminalNilstrieb-3/+10
The current error message is _really_ confusing.
2023-03-10Auto merge of #10479 - Jarcho:issue_10474, r=flip1995bors-3/+23
Don't lint `manual_clamp` in const contexts. fixes #10474 Probably worth including in the sync. r? `@flip1995` changelog: [`manual_clamp`]: Don't lint in const contexts.
2023-03-10Ignore sgx platform for issue-36710Raoul Strackx-0/+1
2023-03-10Fix run-make LVI testsRaoul Strackx-25/+38
2023-03-10rustdoc: Don't crash on `crate` references in blocksAdrian Heine-10/+7
This is a regression from #94857.
2023-03-10Don't lint `manual_clamp` in const contexts.Jason Newcomb-3/+23
2023-03-10Auto merge of #108977 - matthiaskrgr:rollup-1bnl1hu, r=matthiaskrgrbors-121/+157
Rollup of 9 pull requests Successful merges: - #108879 (Unconstrained terms should account for infer vars being equated) - #108936 (Rustdoc: don't hide anonymous reexport) - #108940 (Add myself to compiler reviewers list) - #108945 (Make some report and emit errors take DefIds instead of BodyIds) - #108946 (Document the resulting values produced when using `From<bool>` on floats) - #108956 (Make ptr::from_ref and ptr::from_mut in #106116 const.) - #108960 (Remove `body_def_id` from `Inherited`) - #108963 (only call git on git checkouts during bootstrap) - #108964 (Fix the docs for pointer method with_metadata_of) Failed merges: - #108950 (Directly construct Inherited in typeck.) r? `@ghost` `@rustbot` modify labels: rollup
2023-03-10Ignore LVI incompatible assembly tests on sgx platformRaoul Strackx-0/+4
2023-03-10Fix LVI inline assembly testRaoul Strackx-13/+4
2023-03-10Fix LVI generic load testRaoul Strackx-1/+1
2023-03-10Fix rustc test suitebjorn3-0/+1
2023-03-10Refactor: Distinguish scrutinee expression from match expressioniDawer-10/+10
2023-03-10bootstrap: document tidyAlex Huang-0/+2
2023-03-10Refactor hir::diagnostics::MissingMatchArms fields, better namingiDawer-8/+7
2023-03-10Rustup to rustc 1.70.0-nightly (39f2657d1 2023-03-09)bjorn3-3/+3
2023-03-10Sync from rust 39f2657d1101b50f9b71ae460b762d330cc8426bbjorn3-3/+5
2023-03-10Forbid `#[target_feature]` on safe default implementationsLéo Lanteri Thauvin-2/+17
2023-03-10Split __thread_local_inner macroAyush Singh-194/+316
Split the __thread_local_inner macro to make it more readable. Also move everything to crate::sys::common::thread_local. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10Move __thread_local_inner to sysAyush Singh-194/+194
Move __thread_local_inner macro in crate::thread::local to crate::sys. Currently, the tidy check does not fail for `library/std/src/thread/local.rs` even though it contains platform specific code. This is beacause target_family did not exist at the time the tidy checks were written [1]. [1]: https://github.com/rust-lang/rust/pull/105861#discussion_r1125841678 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10Auto merge of #102256 - cjgillot:let-under, r=lcnrbors-19/+271
Introduce a no-op `PlaceMention` statement for `let _ =`. Fixes https://github.com/rust-lang/rust/issues/54003 Fixes https://github.com/rust-lang/rust/issues/80059 Split from https://github.com/rust-lang/rust/pull/101500 This PR introduces a new `PlaceMention` statement dedicated to matches that neither introduce bindings nor ascribe types. Without this, all traces of the match would vanish from MIR, making it impossible to diagnose unsafety or use in #101500. This allows to mark `let _ = <unsafe union access or dereference>` as requiring an unsafe block. Nominating for lang team, as this introduces an extra error.
2023-03-10Remove unnecessary argumentiDawer-5/+4
2023-03-10Rollup merge of #108964 - majaha:ptr_metadata_doc, r=workingjubileeMatthias Krüger-4/+4
Fix the docs for pointer method with_metadata_of The name of the argument to `{*const T, *mut T}::with_metadata_of` was changed from `val` to `meta` recently, but the docs weren't updated to match. Relevant pull request: #103701
2023-03-10Rollup merge of #108963 - jhheider:fix-CI-non-git-builds, r=albertlarsan68Matthias Krüger-1/+1
only call git on git checkouts during bootstrap fixes https://github.com/rust-lang/rust/issues/108959
2023-03-10Rollup merge of #108960 - compiler-errors:no-body-def-id, r=cjgillotMatthias Krüger-84/+55
Remove `body_def_id` from `Inherited` We can just use the body id from the obligation cause. Follow-up to #108945, only my commit is relevant. r? `@cjgillot` cc `@spastorino`
2023-03-10Rollup merge of #108956 - Raekye:master, r=scottmcmMatthias Krüger-2/+2
Make ptr::from_ref and ptr::from_mut in #106116 const. As per https://github.com/rust-lang/rust/issues/106116#issuecomment-1462571833
2023-03-10Rollup merge of #108946 - bmoxb:bool-to-float-docs, r=cuviperMatthias Krüger-2/+24
Document the resulting values produced when using `From<bool>` on floats Have the documentation of the implementation of `From<bool>` on `f32` and `f64` indicate the output values (`0.0` for `false` and `1.0` for `true`). closes #108939
2023-03-10Rollup merge of #108945 - spastorino:pass-def-id-instead-of-using-hir-id, ↵Matthias Krüger-43/+50
r=compiler-errors Make some report and emit errors take DefIds instead of BodyIds Breaking off from #108915 r? `@compiler-errors`
2023-03-10Rollup merge of #108940 - b-naber:reviewers-list, r=compiler-errorsMatthias Krüger-0/+1
Add myself to compiler reviewers list
2023-03-10Rollup merge of #108936 - GuillaumeGomez:rustdoc-anonymous-reexport, r=notriddleMatthias Krüger-4/+34
Rustdoc: don't hide anonymous reexport Fixes https://github.com/rust-lang/rust/issues/108931. From https://github.com/rust-lang/rust/issues/108931, it appears that having anonymous re-exports for traits is actually used in some places, so instead of hiding them automatically, we should prevent them to be ever inlined. r? `@notriddle`
2023-03-10Rollup merge of #108879 - compiler-errors:constrained-root-var, r=lcnrMatthias Krüger-15/+20
Unconstrained terms should account for infer vars being equated Follow-up from the canonicalization PR, wanted to break this one out so I can approve the other PR. r? `@lcnr`
2023-03-10Use anonymous lifetimesiDawer-1/+1
2023-03-10Auto merge of #10475 - flip1995:beta-changelog, r=xFrednetbors-3/+3
Update changelog for beta-accepted labels Roses are red Violets are blue r? `@xFrednet` is better at this I can't rhyme. https://github.com/rust-lang/rust-clippy/pull/10423 https://github.com/rust-lang/rust-clippy/pull/10265 changelog: none
2023-03-10Update changelog for beta-accepted labelsPhilipp Krones-3/+3
2023-03-10Auto merge of #14316 - HKalbasi:master, r=HKalbasibors-2/+30
Fix stack overflow when derefrencing `&!` fix #14310
2023-03-10Update triagebot rust-analyzer team mentionLukas Wirth-1/+1
The working group got renamed
2023-03-10Fix stack overflow when derefrencing `&!`hkalbasi-2/+30
2023-03-10Auto merge of #14313 - Veykril:notifs, r=Veykrilbors-45/+68
Make project loading errors less intrusive cc https://github.com/rust-lang/rust-analyzer/issues/14193 closes https://github.com/rust-lang/rust-analyzer/issues/9909 ![image](https://user-images.githubusercontent.com/3757771/224274817-a5a8cb0c-7bda-454d-9772-5f839f360b9a.png)
2023-03-10Update Cargo.lock (Clippy version)Philipp Krones-4/+4
2023-03-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-775/+2508
2023-03-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-775/+2508
2023-03-10updating commentlcnr-1/+1
Co-authored-by: Ruby Lazuli <general@patchmixolydic.com>
2023-03-10Auto merge of #10275 - Alexendoo:format-args-ast, r=flip1995bors-90/+221
Migrate `write.rs` to `rustc_ast::FormatArgs` changelog: none Part 1 of #10233 The additions to `clippy_utils` are the main novelty of this PR, there's no removals yet since other parts still rely on `FormatArgsExpn` The changes to `write.rs` itself are relatively straightforward this time around, as there's no lints in it that rely on type checking format params r? `@flip1995`
2023-03-10Fix is_quiescent reportingLukas Wirth-5/+7
2023-03-10Auto merge of #10473 - flip1995:rustup, r=flip1995bors-65/+49
Rustup r? `@ghost` changelog: none