| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Currently it will panic due to the resolution's caching issue
|
|
|
|
Clippy backport
r? `@Manishearth`
This is the accompanying PR to https://github.com/rust-lang/rust/pull/114937. This needs to be merged before tomorrow, so that it gets into master, before beta is branched.
The second commit is pretty much an out-of cycle sync, so that we don't get backport-debt for next release cycle right away.
cc `@Mark-Simulacrum` also mentioning you here, to make sure this is included in the beta branching.
|
|
Unstable Book: update `lang_items` page and split it
[`lang_items` rendered](https://github.com/kadiwa4/rust/blob/lang_items_doc/src/doc/unstable-book/src/language-features/lang-items.md), [`start` rendered](https://github.com/kadiwa4/rust/blob/lang_items_doc/src/doc/unstable-book/src/language-features/start.md)
Closes #110274
Rustonomicon PR: rust-lang/nomicon#413, Rust Book PR: rust-lang/book#3705
A lot of information doesn't belong on the `lang_items` page. I added a separate page for the `start` feature and moved some text into the Rustonomicon because the `lang_items` page should not be a tutorial on how to build a `#![no_std]` executable.
The list of existing lang items is too long/unstable, so I removed it.
The doctests still don't work. :(
|
|
|
|
* Prevent ICE when formatting item-only `vec!{}`
Fixes 5735
Attempting to format invocations of macros which are considered "forced
bracket macros" (currently only `vec!`), but are invoked with braces
instead of brackets, and contain only items in their token trees,
currently triggers an ICE in rustfmt. This is because the function that
handles formatting macro invocations containing only items,
`rewrite_macro_with_items`, assumes that the forced delimiter style of
the macro being formatted is the same as the delimiter style in the
macro's source text when attempting to locate the span after the macro's
opening delimiter. This leads to the construction of an invalid span,
triggering the ICE.
The fix here is to pass the old delimiter style to
`rewrite_macro_with_items` as well, so that it can successfully locate
the span.
|
|
Correctly handle async blocks for NEEDLESS_PASS_BY_REF_MUT
Fixes https://github.com/rust-lang/rust-clippy/issues/11299.
The problem was that the `async block`s are popping a closure which we didn't go into, making it miss the mutable access to the variables.
cc `@Centri3`
changelog: none
|
|
[`useless_conversion`]: only lint on paths to fn items and fix FP in macro
Fixes #11065 (which is actually two issues: an ICE and a false positive)
It now makes sure that the function call path points to a function-like item (and not e.g. a `const` like in the linked issue), so that calling `TyCtxt::fn_sig` later in the lint does not ICE (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616836099).
It *also* makes sure that the expression is not part of a macro call (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616919639). ~~I'm not sure if there's a better way to check this other than to walk the parent expr chain and see if any of them are expansions.~~ (edit: it doesn't do this anymore)
changelog: [`useless_conversion`]: fix ICE when call receiver is a non-fn item
changelog: [`useless_conversion`]: don't lint if argument is a macro argument (fixes a FP)
r? `@llogiq` (reviewed #10814, which introduced these issues)
|
|
update Miri
r? `@ghost`
|
|
tree borrows: more comments in foreign_read transition
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #112751 (rustdoc: Fixes with --test-run-directory and relative paths.)
- #114749 (Update `mpsc::Sender` doc to reflect that it implements `Sync`)
- #114876 (Don't ICE in `is_trivially_sized` when encountering late-bound self ty)
- #114881 (clarify CStr lack of layout guarnatees)
- #114921 (Remove Folyd from librustdoc static files)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Signed-off-by: cui fliter <imcusg@gmail.com>
|
|
rustdoc: Fixes with --test-run-directory and relative paths.
Fixes #112191
Fixes #112210
This fixes some issues with `--test-run-directory` and its interaction with `--runtool` and `--persist-doctests`. Relative directories don't work with `Command::current_dir` very well because it has platform-specific behavior with relative paths. This fixes it by avoiding the use of relative paths.
This is needed because cargo is switching to use `--test-run-directory`, and it uses relative paths when interacting with rustdoc/rustc.
|
|
This makes the test snapshots less sensitive to lines being added/removed.
|
|
rustc book: make more pleasant to search
|
|
r=notriddle
Improve code readability by moving fmt args directly into the string
There are some of occurrences where I also transformed `write!(f, "{}", x)` into `f.write_str(x.as_str())`.
r? `@notriddle`
|
|
we are migrating to askama
see https://github.com/rust-lang/rust/issues/108868
|
|
Avoid unnecessary Vec resize.
If `size > 0` current implementation will first create an empty vec and then push an element into it, which will cause a resize that can be easily avoided.
It's obviously not a big deal, but this also gets rid of `mut` local variable.
|
|
If `size > 0` current implementation will first create an empty
vec and then push an element into it, which will cause a resize
that can be easily avoided.
It's obviously not a big deal, but this also gets rid of `mut`
local variable.
|
|
|
|
|
|
Fixes #5655.
|
|
|
|
|
|
Update LLVM submodule
Merge the current release/17.x branch.
Fixes #114691.
Fixes #114312.
The test for the latter is taken from #114726.
|
|
|
|
When reporting a heap use-after-free, say where the allocation was allocated and deallocated
This is a partial solution to: https://github.com/rust-lang/miri/issues/2917
Currently in the interpreter, we only have accurate information for where heap allocations are allocated and deallocated (see https://github.com/rust-lang/miri/pull/2940#discussion_r1243559711). So this just implements support for allocations where the information is already available, and the full support will require more interpreter tweaks.
|
|
Replace hand-written binary search with Vec::binary_search_by.
It's similar to https://github.com/rust-lang/miri/pull/3021 and should improve maintainability.
|
|
|
|
|
|
|
|
Stabilize thread local cell methods.
Closes #92122.
|
|
It's similar to https://github.com/rust-lang/miri/pull/3021 and
should improve maintainability.
|
|
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
Fix typos
|
|
Point at return type when it influences non-first `match` arm
When encountering code like
```rust
fn foo() -> i32 {
match 0 {
1 => return 0,
2 => "",
_ => 1,
}
}
```
Point at the return type and not at the prior arm, as that arm has type `!` which isn't influencing the arm corresponding to arm `2`.
Fix #78124.
|
|
Add `{Local}ModDefId` to more strongly type DefIds`
Based on #110862 by `@Nilstrieb`
|
|
C `mem` function shims: consistently treat "invalid" pointers as UB
Depends on https://github.com/rust-lang/rust/pull/113435.
|
|
|
|
[nit][typo] Fix out of order words.
|