| Age | Commit message (Collapse) | Author | Lines |
|
So we don't need to add normalization to every test that includes a
panic message, add a global normalization to compiletest.
|
|
This reverts commit b4d923cea0509933b1fb859930cb20784251f9be.
|
|
|
|
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4)
---
updated-dependencies:
- dependency-name: tmp
dependency-version: 0.2.4
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
- rust-lang/rust#144676 (Add documentation for unstable_feature_bound)
- rust-lang/rust#144836 (Change visibility of Args new function)
- rust-lang/rust#144910 (Add regression tests for seemingly fixed issues)
- rust-lang/rust#144913 ([rustdoc] Fix wrong `i` tooltip icon)
- rust-lang/rust#144924 (compiletest: add hint for when a ui test produces no errors)
- rust-lang/rust#144926 (Correct the use of `must_use` on btree::IterMut)
- rust-lang/rust#144928 (Drop `rust-version` from `rustc_thread_pool`)
- rust-lang/rust#144945 (Autolabel PRs that change explicit tail call tests as `F-explicit_tail_calls`)
- rust-lang/rust#144954 (run-make: Allow blessing snapshot files that don't exist yet)
- rust-lang/rust#144971 (num: Rename `isolate_most_least_significant_one` functions)
- rust-lang/rust#144978 (Fix some doc links for intrinsics)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix non-lsp compliant `Response` definition
|
|
|
|
Report the incorrect payload when failing to deserialize lsp messages
|
|
|
|
run-make: Allow blessing snapshot files that don't exist yet
This makes it possible to bless the snapshot files used by `diff()` in newly-created run-make tests, without having to create the files manually beforehand.
r? jieyouxu
|
|
r=clubby789
compiletest: add hint for when a ui test produces no errors
|
|
Add remove literal dbg stmt for remove_dbg
|
|
Remove only contain literals dbg statement
```rust
fn foo() {
let n = 2;
$0dbg!(3);
dbg!(2.6);
dbg!(1, 2.5);
dbg!('x');
dbg!(&n);
dbg!(n);
// needless comment
dbg!("foo");$0
}
```
->
```rust
fn foo() {
// needless comment
}
```
Old:
```rust
fn foo() {
3;
2.6;
(1, 2.5);
'x';
&n;
n;
// needless comment
"foo";
}
```
|
|
Instead of collecting pretty printers transitively when building
executables/staticlibs/cdylibs, let the debugger find each crate's
pretty printers via its .debug_gdb_scripts section. This covers the case
where libraries defining custom pretty printers are loaded dynamically.
|
|
fix: Do not remove the original token when descending into derives
|
|
This makes it possible to bless the snapshot files used by `diff()` in
newly-created run-make tests, without having to create the files manually
beforehand.
|
|
fix external docs for exported macros
|
|
add test
|
|
Add assignment type analysis for ide-completion
|
|
unicode-table-generator panicked while populating distinct_indices
because of duplicated indices. This was introduced by swapping the
order of canonical_words.push(...) and canonical_words.len().
|
|
|
|
Migrate `expand_glob_import` assist to use `SyntaxEditor`
|
|
Hmikihiro/remove_ted_from_replace_named_generic_with_impl
remove `ted` from replace_named_generic_with_impl.rs
|
|
remove `add_attr()` from edit_in_place.rs because it use `ted`.
|
|
Slim down compile time artifact progress reports
|
|
|
|
`rust-analyzer` subtree update
Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/8d75311400a108d7ffe17dc9c38182c566952e6e.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
Add a tidy check to prevent adding UI tests directly under `tests/ui/`
This PR implements https://github.com/rust-lang/compiler-team/issues/902.
Only the last commit (adding the new check) is functional; earlier commits are just small drive-by changes to make the other ui/ui-fulldeps checks more logically contained.
r? ```@Kobzol``` (or compiler)
|
|
|
|
This caused rename to remove both, because it couldn't rename the derive-expanded one.
I spent some time trying to create a test for this, before giving up. But I checked manually that this works.
|
|
some cannot rename
|
|
|
|
|
|
|
|
chore: fix crates/ide/src/folding_ranges.rs file perms
|
|
fix: Correctly goto `From` impl when on `into()` even when the call is inside a macro
|
|
Example
===
```rust
let x = $0;
```
Old completions:
```rust
let x = if $1 {
$0
};
```
This PR current completions:
```rust
let x = if $1 {
$2
} else {
$0
};
```
|
|
Descend into macros first.
|
|
|
|
|
|
Replaces all `___` with `---` in hover documentation markups.
Both styles are valid per the GitHub Flavored Markdown spec,
but `---` is less ambiguous and already more widely used in rust-analyzer
|
|
755 -> 644
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 07b7dc90ee4df5815dbb91ef8e98cb93571230f5
Filtered ref: 3785af8cd0fe0eeb48a0f920ca3fae973cf842d7
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to 07b7dc90ee4df5815dbb91ef8e98cb93571230f5.
|
|
Distinguish prepending and replacing self ty in predicates
There are two kinds of functions called `with_self_ty`:
1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation.
2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type.
This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
|
|
Remove unnecessary `rust_` prefixes
part of https://github.com/rust-lang/rust/issues/116005
Honestly, not sure if this can affect linking somehow, also I didn't touched things like `__rust_panic_cleanup` and `__rust_start_panic` which very likely will break something, so just small cleanup here
also didn't changed `rust_panic_without_hook` because it was renamed here https://github.com/rust-lang/rust/pull/144852
r? libs
|
|
For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info
Testing ui-fulldeps in "stage 1" actually uses the stage 0 compiler, so that test programs can link against stage 1 rustc crates.
Unfortunately, using the stage 0 compiler causes problems when compiletest tries to obtain target information from the compiler, but the output format has changed since the last bootstrap beta bump.
We can work around this by also providing compiletest with a stage 1 compiler, and having it use that compiler to query for target information.
---
This fixes the stage 1 ui-fulldeps failure seen at https://github.com/rust-lang/rust/pull/144443#issuecomment-3146992771.
|
|
Do not give function allocations alignment in consteval and Miri.
We do not yet have a (clear and T-lang approved) design for how `#[align(N)]` on functions should affect function pointers' addresses on various platforms, so for now do not give function pointers alignment in consteval and Miri.
----
Old summary:
Not a full solution to <https://github.com/rust-lang/rust/issues/144661>, but fixes the immediate issue by making function allocations all have alignment 1 in consteval, ignoring `#[rustc_align(N)]`, so the compiler doesn't know if any offset other than 0 is non-null.
A more "principlied" solution would probably be to make function pointers to `#[instruction_set(arm::t32)]` functions be at offset 1 of an align-`max(2, align attribute)` allocation instead of at offset 0 of their allocation during consteval, and on wasm to either disallow `#[align(N)]` where N > 1, or to pad the function table such that the function pointer of a `#[align(N)]` function is a multiple of `N` at runtime.
|
|
Add lint against dangling pointers from local variables
## `dangling_pointers_from_locals`
*warn-by-default*
The `dangling_pointers_from_locals` lint detects getting a pointer to data of a local that will be dropped at the end of the function.
### Example
```rust
fn f() -> *const u8 {
let x = 0;
&x // returns a dangling ptr to `x`
}
```
```text
warning: a dangling pointer will be produced because the local variable `x` will be dropped
--> $DIR/dangling-pointers-from-locals.rs:10:5
|
LL | fn simple() -> *const u8 {
| --------- return type of the function is `*const u8`
LL | let x = 0;
| - `x` is defined inside the function and will be drop at the end of the function
LL | &x
| ^^
|
= note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned
= note: `#[warn(dangling_pointers_from_locals)]` on by default
```
### Explanation
Returning a pointer from a local value will not prolong its lifetime, which means that the value can be dropped and the allocation freed while the pointer still exists, making the pointer dangling.
If you need stronger guarantees, consider using references instead, as they are statically verified by the borrow-checker to never dangle.
------
This is related to GitHub codeql [CWE-825](https://github.com/github/codeql/blob/main/rust/ql/src/queries/security/CWE-825/AccessAfterLifetimeBad.rs) which shows examples of such simple miss-use.
It should be noted that C compilers warns against such patterns even without `-Wall`, https://godbolt.org/z/P7z98arrc.
------
`@rustbot` labels +I-lang-nominated +T-lang
cc `@traviscross`
r? compiler
|
|
|