about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-08-18narrow down the lint trigger constraintKyle Lin-22/+51
2023-08-18fomar filesKyle Lin-4/+9
2023-08-18Still resolving rustdoc resolution panickingKyle Lin-71/+74
2023-08-18Support Reference & ReferenceUnknown link lintKyle Lin-61/+221
2023-08-18Refactor lint from rustc to rustdocKyle Lin-28/+192
2023-08-18add more testsKyle Lin-1/+1
2023-08-18Fix resolution cachingKyle Lin-44/+55
2023-08-18Add warn level lint `redundant_explicit_links`Kyle Lin-11/+124
- Currently it will panic due to the resolution's caching issue
2023-08-18rework link parsing loopKyle Lin-24/+65
2023-08-18Auto merge of #114938 - flip1995:clippy_backport, r=matthiaskrgrbors-36/+201
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.
2023-08-17Rollup merge of #113715 - kadiwa4:lang_items_doc, r=JohnTitorJosh Stone-252/+118
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. :(
2023-08-17style-guide: Add guidance for defining formatting for specific macrosJosh Triplett-1/+6
2023-08-17Prevent ICE when formatting item-only `vec!{}` (#5879)tdanniels-9/+19
* 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.
2023-08-17Auto merge of #11314 - GuillaumeGomez:needless_ref_mut_async_block, r=Centri3bors-23/+129
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
2023-08-17Auto merge of #11070 - y21:issue11065, r=flip1995bors-13/+72
[`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)
2023-08-17Auto merge of #114932 - RalfJung:miri, r=RalfJungbors-177/+472
update Miri r? `@ghost`
2023-08-17Auto merge of #3031 - RalfJung:foreign-read, r=RalfJungbors-3/+17
tree borrows: more comments in foreign_read transition
2023-08-17tree borrows: more comments in foreign_read transitionRalf Jung-3/+17
2023-08-17CI: add more debug logging to Docker cachingJakub Beránek-4/+10
2023-08-17Auto merge of #114922 - matthiaskrgr:rollup-qktdihi, r=matthiaskrgrbors-0/+16
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
2023-08-17doc: update lld-flavor refcui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-08-17Rollup merge of #112751 - ehuss:persist-test-run-directory, r=jshaMatthias Krüger-0/+16
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.
2023-08-17coverage: Anonymize line numbers in `run-coverage` test snapshotsZalathar-0/+17
This makes the test snapshots less sensitive to lines being added/removed.
2023-08-16Rollup merge of #114878 - tshepang:tshepang-patch-1-1, r=davidtwcoMatthias Krüger-0/+3
rustc book: make more pleasant to search
2023-08-16Rollup merge of #114822 - GuillaumeGomez:code-readability-improvement, ↵Matthias Krüger-336/+342
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`
2023-08-16Rollup merge of #113115 - tshepang:patch-5, r=est31Matthias Krüger-1/+1
we are migrating to askama see https://github.com/rust-lang/rust/issues/108868
2023-08-16Auto merge of #3027 - ttsugriy:range-map, r=RalfJungbors-5/+2
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.
2023-08-16Avoid unnecessary Vec resize.Taras Tsugrii-5/+2
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.
2023-08-16Describe how to format trailing where clausesMichael Goulet-2/+25
2023-08-16bugfix: reflect how rustfmt formats type aliasesMichael Goulet-3/+3
2023-08-16Remove newlines in where clauses for v2Kevin Ji-1/+3
Fixes #5655.
2023-08-16Use more named format argsGuillaume Gomez-85/+130
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-300/+261
2023-08-16Auto merge of #114847 - nikic:update-llvm-12, r=cuviperbors-0/+0
Update LLVM submodule Merge the current release/17.x branch. Fixes #114691. Fixes #114312. The test for the latter is taken from #114726.
2023-08-16on out-of-bounds error, show where the allocation was createdRalf Jung-8/+46
2023-08-16Auto merge of #2940 - saethlin:use-after-free-spans, r=RalfJungbors-18/+229
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.
2023-08-16Auto merge of #3028 - ttsugriy:range-map-find-offset, r=RalfJungbors-20/+15
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.
2023-08-16Merge from rustcThe Miri Conjob Bot-78/+205
2023-08-16Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-16rustc book: make more pleasant to searchTshepang Mbambo-0/+3
2023-08-16Auto merge of #114689 - m-ou-se:stabilize-thread-local-cell-methods, r=thomccbors-1/+0
Stabilize thread local cell methods. Closes #92122.
2023-08-15Replace hand-written binary search with Vec::binary_search_by.Taras Tsugrii-20/+15
It's similar to https://github.com/rust-lang/miri/pull/3021 and should improve maintainability.
2023-08-15Tidy up the implementationBen Kimock-12/+9
2023-08-15Explain why we save spans for some memory types and not othersBen Kimock-0/+2
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-08-15Rollup merge of #114826 - xzmeng:fix-typos, r=JohnTitorMatthias Krüger-7/+7
Fix typos
2023-08-15Rollup merge of #114819 - estebank:issue-78124, r=compiler-errorsMatthias Krüger-35/+17
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.
2023-08-15Rollup merge of #114772 - fee1-dead-contrib:typed-did, r=b-naberGuillaume Gomez-9/+9
Add `{Local}ModDefId` to more strongly type DefIds` Based on #110862 by `@Nilstrieb`
2023-08-15Auto merge of #2972 - RalfJung:c-mem-functions, r=RalfJungbors-6/+46
C `mem` function shims: consistently treat "invalid" pointers as UB Depends on https://github.com/rust-lang/rust/pull/113435.
2023-08-15C string function shims: consistently treat "invalid" pointers as UBRalf Jung-6/+46
2023-08-15Auto merge of #3018 - ttsugriy:ttsugriy-patch-1, r=RalfJungbors-1/+1
[nit][typo] Fix out of order words.