]> git.lizzy.rs Git - rust.git/log
rust.git
23 months agoAvoid cloning IMPL node if we don't have to
Tiddo Langerak [Wed, 10 Aug 2022 14:03:15 +0000 (17:03 +0300)]
Avoid cloning IMPL node if we don't have to

23 months agoFeat: extracted method from trait impl is placed in existing impl
Tiddo Langerak [Tue, 9 Aug 2022 06:41:56 +0000 (09:41 +0300)]
Feat: extracted method from trait impl is placed in existing impl

Previously, when triggering a method extraction from within a trait
impl block, then this would always create a new impl block for
the struct, even if there already is one. Now, it'll put the extracted
method in the matching existing block if it exists.

23 months agoAuto merge of #12986 - Veykril:completions, r=Veykril
bors [Tue, 9 Aug 2022 16:23:54 +0000 (16:23 +0000)]
Auto merge of #12986 - Veykril:completions, r=Veykril

Fix pattern field completions not working for unions

23 months agoAdd some more `cov_mark`s
Lukas Wirth [Tue, 9 Aug 2022 16:08:05 +0000 (18:08 +0200)]
Add some more `cov_mark`s

23 months agoFix pattern field completions not working for unions
Lukas Wirth [Tue, 9 Aug 2022 15:53:16 +0000 (17:53 +0200)]
Fix pattern field completions not working for unions

23 months agoAuto merge of #12981 - kadiwa4:remove_some_imports, r=Veykril
bors [Tue, 9 Aug 2022 07:03:35 +0000 (07:03 +0000)]
Auto merge of #12981 - kadiwa4:remove_some_imports, r=Veykril

Remove imports that are also in edition 2021's prelude

small cleanup

23 months agoremove imports that are also in edition 2021's prelude
KaDiWa [Mon, 8 Aug 2022 23:16:32 +0000 (01:16 +0200)]
remove imports that are also in edition 2021's prelude

23 months agoAuto merge of #12974 - fprasx:master, r=lnicola
bors [Mon, 8 Aug 2022 15:13:20 +0000 (15:13 +0000)]
Auto merge of #12974 - fprasx:master, r=lnicola

Corrected order of printing op and `=`

Fixes https://github.com/rust-lang/rust-analyzer/issues/12971 where `Display` impl for assignment operators does `=+` instead of `+=`

23 months agoCorrected order of printing op and `=`
fprasx [Mon, 8 Aug 2022 15:05:18 +0000 (11:05 -0400)]
Corrected order of printing op and `=`

23 months agoAuto merge of #12962 - lowr:patch/parse-last-range-pattern, r=Veykril
bors [Mon, 8 Aug 2022 15:03:39 +0000 (15:03 +0000)]
Auto merge of #12962 - lowr:patch/parse-last-range-pattern, r=Veykril

Parse range patterns in struct and slice without trailing comma

Resolves #12935

This patch includes the support for range patterns in slices, which is unstable (tracked in https://github.com/rust-lang/rust/issues/67264). If it's not desired I can remove it.

23 months agoParse range patterns in let statement with type annotation
Ryo Yoshida [Mon, 8 Aug 2022 15:00:22 +0000 (00:00 +0900)]
Parse range patterns in let statement with type annotation

23 months agoAuto merge of #12967 - jhgg:code/fix-toggle-hints, r=Veykril
bors [Mon, 8 Aug 2022 12:05:07 +0000 (12:05 +0000)]
Auto merge of #12967 - jhgg:code/fix-toggle-hints, r=Veykril

[code] make toggleInlayHints understand {off,on}UntilPressed

fixes #12964

23 months agoAuto merge of #12951 - jonas-schievink:doc-cli-stability, r=Veykril
bors [Mon, 8 Aug 2022 11:56:44 +0000 (11:56 +0000)]
Auto merge of #12951 - jonas-schievink:doc-cli-stability, r=Veykril

internal: Document CLI flag stability

23 months agoAuto merge of #12905 - HKalbasi:master, r=Veykril
bors [Mon, 8 Aug 2022 11:46:22 +0000 (11:46 +0000)]
Auto merge of #12905 - HKalbasi:master, r=Veykril

Generate rust type from json

fix #10118

Should this be a diagnostic? I made it a diagnostic because of issue label.

23 months agoAuto merge of #12937 - fprasx:master, r=Veykril
bors [Mon, 8 Aug 2022 11:37:51 +0000 (11:37 +0000)]
Auto merge of #12937 - fprasx:master, r=Veykril

Add fixups for incomplete in proc-macros

Partially implements https://github.com/rust-lang/rust-analyzer/issues/12777.

Added support for for loops and match statements.

I couldn't do paths like `crate::foo::` as I wasn't able to add `SyntheticTokens` to the end of `foo::`, they always ended up after `crate::`

This is my first contribution so please don't be shy about letting me know if I've done anything wrong!

23 months agoAuto merge of #12942 - lowr:fix/concat-with-char, r=Veykril
bors [Mon, 8 Aug 2022 11:28:42 +0000 (11:28 +0000)]
Auto merge of #12942 - lowr:fix/concat-with-char, r=Veykril

fix: make `concat!` work with char

Fixes #12921

- I avoided making `unquote_str()` take char literals as well because it's depended on by another function `parse_string()` that's only supposed to take strings.
- Even with this patch, we don't output `\0` as `\u{0}` which #12921 pointed out ~~, but we're not actually responsible for serializing it but rowan is~~. They are functionally equivalent and I don't think it'd cause any confusion, but we *could* try escaping them before serialization (for reference, `rustc -Zunpretty=expanded`, which `cargo expand` uses under the hood, [makes use of `str::escape_default()`](https://github.com/rust-lang/rust/blob/3830ecaa8db798d2727cbdfa4ddf314ff938f268/compiler/rustc_ast/src/util/literal.rs#L161).

23 months ago[code] make toggleInlayHints understand {off,on}UntilPressed
Jake Heinz [Mon, 8 Aug 2022 00:20:17 +0000 (00:20 +0000)]
[code] make toggleInlayHints understand {off,on}UntilPressed

23 months agoAuto merge of #12956 - oxalica:feat/la-arena-apis, r=lnicola
bors [Sun, 7 Aug 2022 08:50:23 +0000 (08:50 +0000)]
Auto merge of #12956 - oxalica:feat/la-arena-apis, r=lnicola

More methods and traits for `la_arena::ArenaMap`

Continue of #12931. Seems that I forgot some methods in the previous PR :(

I also changed `ArenaMap::insert` to return the old value, to match the map-like collection API of std. **So this is a breaking change.**

r? `@lnicola`

23 months agoParse range patterns in struct and slice without trailing comma
Ryo Yoshida [Fri, 5 Aug 2022 11:01:50 +0000 (20:01 +0900)]
Parse range patterns in struct and slice without trailing comma

23 months agoAuto merge of #12959 - lnicola:rainbows-again, r=lnicola
bors [Sun, 7 Aug 2022 06:30:11 +0000 (06:30 +0000)]
Auto merge of #12959 - lnicola:rainbows-again, r=lnicola

Fix `test_rainbow_highlighting` gate

CC https://github.com/rust-lang/rust-analyzer/pull/12903#pullrequestreview-1058906953

23 months agoFix test_rainbow_highlighting gate
Laurențiu Nicola [Sun, 7 Aug 2022 06:29:26 +0000 (09:29 +0300)]
Fix test_rainbow_highlighting gate

23 months agoReturns the old value for la_arena::ArenaMap::insert
oxalica [Sat, 6 Aug 2022 20:48:52 +0000 (04:48 +0800)]
Returns the old value for la_arena::ArenaMap::insert

23 months agoImpl more methods and traits for la_arena::ArenaMap
oxalica [Sat, 6 Aug 2022 20:17:04 +0000 (04:17 +0800)]
Impl more methods and traits for la_arena::ArenaMap

23 months agoImport serde derives on converting json to struct
hkalbasi [Sat, 6 Aug 2022 14:51:51 +0000 (19:21 +0430)]
Import serde derives on converting json to struct

23 months agoAuto merge of #12953 - stanciuadrian:fmt, r=lnicola
bors [Sat, 6 Aug 2022 15:02:30 +0000 (15:02 +0000)]
Auto merge of #12953 - stanciuadrian:fmt, r=lnicola

Run stable `fmt` & `cargo` through `rustup`

`cargo test -p ide-assists` fails on Windows/x64/nightly:

```shell
> rustup self update
info: checking for self-updates
  rustup unchanged - 1.25.1

> rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates

   stable-x86_64-pc-windows-msvc unchanged - rustc 1.62.1 (e092d0b6b 2022-07-16)
  nightly-x86_64-pc-windows-msvc unchanged - rustc 1.64.0-nightly (affe0d3a0 2022-08-05)

info: cleaning up downloads & tmp directories

> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\stanc\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.64.0-nightly (affe0d3a0 2022-08-05)

> cargo test -p ide-assists

test tests::sourcegen::sourcegen_assists_docs ... FAILED

failures:

---- tests::sourcegen::sourcegen_assists_docs stdout ----
thread 'tests::sourcegen::sourcegen_assists_docs' panicked at 'Failed to run rustfmt from toolchain 'stable'. Please run `rustup component add rustfmt --toolchain stable` to install it.', crates\sourcegen\src\lib.rs:141:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
    tests::sourcegen::sourcegen_assists_docs

test result: FAILED. 1576 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.82s

error: test failed, to rerun pass '-p ide-assists --lib'
```

After some investigation it seemed that [`cmd!`](https://github.com/rust-lang/rust-analyzer/blob/51705698bd66919435e4fcbc25d96bd7fc5583f4/crates/sourcegen/src/lib.rs#L139) didn't execute the expected (stable) rustfmt.

A simple `xshell` test failed too:

```rust
use xshell::{cmd, Shell};

fn main() {
    let sh = &Shell::new().unwrap();
    sh.set_var("RUSTUP_TOOLCHAIN", "stable");
    let version = cmd!(sh, "rustfmt --version").read().unwrap_or_default();
    println!("{version}");
}
```

Bypassing `xshell` and using `Command` directly failed too:

```rust
use std::process::{Command, Stdio};

fn main() {
    let child = Command::new("rustfmt")
        .arg("--version")
        .stdin(Stdio::null())
        .stdout(Stdio::piped())
        .env("RUSTUP_TOOLCHAIN", "stable")
        .spawn()
        .expect("failed to start");
    let output = child.wait_with_output().unwrap();
    let version = String::from_utf8_lossy(&output.stdout);
    println!("{version}");
}
```

Spawning `cargo +stable fmt version` [failed too](https://github.com/rust-lang/rustup/issues/3036) with `error: no such subcommand: +stable`.

Only `rustup run stable` worked fine for both `cargo` and `fmt`.

Thanks to `@lnicola` for a live investigation session, hints and tips.

23 months agorun stable fmt through rustup
Adrian Stanciu [Sat, 6 Aug 2022 14:12:13 +0000 (17:12 +0300)]
run stable fmt through rustup

23 months agoAuto merge of #12931 - oxalica:feat/la-arena-apis, r=lnicola
bors [Sat, 6 Aug 2022 13:39:31 +0000 (13:39 +0000)]
Auto merge of #12931 - oxalica:feat/la-arena-apis, r=lnicola

Add more constructors and entry-APIs for la-arena

`la-arena` on crates.io is quite helpful when just a thin wrapper for Vec with u32 indices is needed.
But the current API is not ergonomic enough.

This PR
- Adds `ArenaMap::new`. Not sure why only `Arena` has it now.
- Adds `Arena{,Map}::with_capacity` for known-size storage.
- Adds entry-API for `ArenaMap` for easier `.entry(idx).or_default().push(value)` or `.entry(idx).or_insert(...)` operations.

23 months agoDocument CLI flag stability
Jonas Schievink [Fri, 5 Aug 2022 13:28:53 +0000 (15:28 +0200)]
Document CLI flag stability

23 months agoAuto merge of #12947 - Veykril:switch-workspace, r=Veykril
bors [Fri, 5 Aug 2022 13:13:44 +0000 (13:13 +0000)]
Auto merge of #12947 - Veykril:switch-workspace, r=Veykril

Don't switch workspace on vfs file changes from libraries

When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.

23 months agoAuto merge of #12949 - Veykril:token-pick, r=Veykril
bors [Fri, 5 Aug 2022 13:06:10 +0000 (13:06 +0000)]
Auto merge of #12949 - Veykril:token-pick, r=Veykril

fix: Fix incorrect token pick rankings

23 months agominor: align with rustc on escaping characters in macro expansion
Ryo Yoshida [Fri, 5 Aug 2022 13:01:09 +0000 (22:01 +0900)]
minor: align with rustc on escaping characters in macro expansion

23 months agofix: Fix incorrect token pick rankings
Lukas Wirth [Fri, 5 Aug 2022 12:59:26 +0000 (14:59 +0200)]
fix: Fix incorrect token pick rankings

23 months agoAuto merge of #12948 - Veykril:classify-ops, r=Veykril
bors [Fri, 5 Aug 2022 12:55:36 +0000 (12:55 +0000)]
Auto merge of #12948 - Veykril:classify-ops, r=Veykril

feat: Handle operators like their trait functions in the IDE

Allows hover and goto implementation to work on `?`, indexing brackets, binary operators, prefix operators and `await`. Regarding `await`, hover will continue to show the keyword docs while goto implementation will bring the user to the `poll` function of the `Future` implementation.
![Code_CJmZ3FGFVn](https://user-images.githubusercontent.com/3757771/183076683-c9899bd6-60d3-461b-965f-0c0f9745e2e8.gif)

Fixes https://github.com/rust-lang/rust-analyzer/issues/12810

23 months agoSimplify
Lukas Wirth [Fri, 5 Aug 2022 12:54:14 +0000 (14:54 +0200)]
Simplify

23 months agoFix visibilities
Lukas Wirth [Fri, 5 Aug 2022 12:28:36 +0000 (14:28 +0200)]
Fix visibilities

23 months agofeat: Handle operators like their trait functions in the IDE
Lukas Wirth [Fri, 5 Aug 2022 12:16:36 +0000 (14:16 +0200)]
feat: Handle operators like their trait functions in the IDE

23 months agoDon't switch workspace on vfs file changes from libraries
Lukas Wirth [Fri, 5 Aug 2022 10:06:31 +0000 (12:06 +0200)]
Don't switch workspace on vfs file changes from libraries

When r-a starts up, it starts switching the workspace before all vfs
events have been processed which causes us to switch workspace multiple
times until all vfs changes have been processed. This scales with the
size of the project and its dependencies. If workspace files from
dependencies as well as the sysroot get loaded, we shouldn't switch
the workspace as those have no impact on the project workspace.

23 months agoAuto merge of #12946 - rust-lang:issue-template, r=lnicola
bors [Fri, 5 Aug 2022 07:09:34 +0000 (07:09 +0000)]
Auto merge of #12946 - rust-lang:issue-template, r=lnicola

Update bug_report.md

Closes https://github.com/rust-lang/rust-analyzer/issues/12944

23 months agoUpdate bug_report.md
Lukas Wirth [Fri, 5 Aug 2022 07:04:27 +0000 (09:04 +0200)]
Update bug_report.md

23 months agoUpdate bug_report.md
Lukas Wirth [Fri, 5 Aug 2022 06:42:13 +0000 (08:42 +0200)]
Update bug_report.md

23 months agofix: make `concat!` work with char
Ryo Yoshida [Thu, 4 Aug 2022 17:51:38 +0000 (02:51 +0900)]
fix: make `concat!` work with char

23 months agoFixed up for loops, added fixme with problem
fprasx [Thu, 4 Aug 2022 14:43:09 +0000 (10:43 -0400)]
Fixed up for loops, added fixme with problem

https://github.com/rust-lang/rust-analyzer/pull/12937#discussion_r937633695

23 months agoShortened fixup for match, added cases for for
fprasx [Thu, 4 Aug 2022 13:28:25 +0000 (09:28 -0400)]
Shortened fixup for match, added cases for for

Previously added a blank _ => {} for match statements

23 months agoAuto merge of #12808 - Veykril:check-workspace, r=Veykril
bors [Thu, 4 Aug 2022 12:57:04 +0000 (12:57 +0000)]
Auto merge of #12808 - Veykril:check-workspace, r=Veykril

feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that

23 months agoDon't flycheck while the workspace is being loaded
Lukas Wirth [Thu, 4 Aug 2022 12:01:33 +0000 (14:01 +0200)]
Don't flycheck while the workspace is being loaded

23 months agoAuto merge of #12939 - jean-santos:errors-ide-hover-wrong-place, r=Veykril
bors [Thu, 4 Aug 2022 12:42:51 +0000 (12:42 +0000)]
Auto merge of #12939 - jean-santos:errors-ide-hover-wrong-place, r=Veykril

Error Diagnostics appear in the wrong place

Fix #12436

23 months agotidy formatting
Jean santos [Thu, 4 Aug 2022 12:28:34 +0000 (09:28 -0300)]
tidy formatting

23 months agoTrigger flycheck on all transitive dependencies as well
Lukas Wirth [Thu, 4 Aug 2022 11:22:15 +0000 (13:22 +0200)]
Trigger flycheck on all transitive dependencies as well

23 months agoon hover fallback error, adds ast::type as possible node
Jean santos [Wed, 3 Aug 2022 20:37:11 +0000 (17:37 -0300)]
on hover fallback error, adds ast::type as possible node

23 months agoTidy formatted
fprasx [Wed, 3 Aug 2022 20:27:43 +0000 (16:27 -0400)]
Tidy formatted

23 months agoAdded fixup for for loops w/ missing parts
fprasx [Wed, 3 Aug 2022 19:51:30 +0000 (15:51 -0400)]
Added fixup for for loops w/ missing parts

23 months agoAdded fixup for match statements w/ missing parts
fprasx [Wed, 3 Aug 2022 18:44:21 +0000 (14:44 -0400)]
Added fixup for match statements w/ missing parts

Passes tests

23 months agoAuto merge of #12934 - Veykril:typing, r=Veykril
bors [Wed, 3 Aug 2022 16:23:49 +0000 (16:23 +0000)]
Auto merge of #12934 - Veykril:typing, r=Veykril

Add a setting to disable comment continuation in VSCode

Fixes https://github.com/rust-lang/rust-analyzer/issues/12928

23 months agoAdd a setting to disable comment continuation in VSCode
Lukas Wirth [Wed, 3 Aug 2022 16:22:45 +0000 (18:22 +0200)]
Add a setting to disable comment continuation in VSCode

23 months agoAuto merge of #12933 - Veykril:proc-ignored, r=Veykril
bors [Wed, 3 Aug 2022 16:11:08 +0000 (16:11 +0000)]
Auto merge of #12933 - Veykril:proc-ignored, r=Veykril

Use an empty expander for ignored non-attribute proc-macros

Identity is the wrong behaviour for anything that's not an attribute here

23 months agoUse an empty expander for ignored non-attribute proc-macros
Lukas Wirth [Wed, 3 Aug 2022 16:10:15 +0000 (18:10 +0200)]
Use an empty expander for ignored non-attribute proc-macros

23 months agoImpl entry-API for la_arena::ArenaMap
oxalica [Wed, 3 Aug 2022 10:16:05 +0000 (18:16 +0800)]
Impl entry-API for la_arena::ArenaMap

We enforce integral and `Copy` key, so some key-related functions are
not necessary since user can just reuse the index for the `entry` call.

23 months agoAdd more constructors for la-arena
oxalica [Wed, 3 Aug 2022 09:35:31 +0000 (17:35 +0800)]
Add more constructors for la-arena

23 months agoAuto merge of #12930 - lnicola:subtree-branch, r=lnicola
bors [Wed, 3 Aug 2022 06:49:13 +0000 (06:49 +0000)]
Auto merge of #12930 - lnicola:subtree-branch, r=lnicola

minor: Use the release branch in xtask promote

23 months agoUse the release branch in xtask promote
Laurențiu Nicola [Wed, 3 Aug 2022 06:48:44 +0000 (09:48 +0300)]
Use the release branch in xtask promote

23 months agoAuto merge of #12837 - DorianListens:dscheidt/generate-enum-data, r=Veykril
bors [Tue, 2 Aug 2022 19:50:01 +0000 (19:50 +0000)]
Auto merge of #12837 - DorianListens:dscheidt/generate-enum-data, r=Veykril

feat: support associated values in "Generate Enum Variant" assist

This change adds support for associated values to the "Generate Enum Variant" assist.

I've split the implementation out into 4 steps to make code review easier:
- Add "add_variant" support to the structural ast editing system in `edit_in_place`
- Migrate `generate_enum_variant` to use structural ast editing instead of string manipulation
- Support tuple fields
- Support record fields

Please let me know if I should leave the commits as-is, or squash before merging.

Fixes #12797

23 months agoSupport PathPat paths in generate_enum_variant
Dorian Scheidt [Tue, 2 Aug 2022 16:11:32 +0000 (12:11 -0400)]
Support PathPat paths in generate_enum_variant

23 months agoBe more strict about supported Paths in generate_enum_variant
Dorian Scheidt [Tue, 2 Aug 2022 15:54:00 +0000 (11:54 -0400)]
Be more strict about supported Paths in generate_enum_variant

PathType path parents don't support this assist

23 months agoSupport record fields in generate_enum_variant
Dorian Scheidt [Wed, 20 Jul 2022 18:02:21 +0000 (13:02 -0500)]
Support record fields in generate_enum_variant

23 months agoSupport tuple fields in generate_enum_variant
Dorian Scheidt [Wed, 20 Jul 2022 17:26:27 +0000 (12:26 -0500)]
Support tuple fields in generate_enum_variant

23 months agoconvert generate_enum_variant to use add_variant
Dorian Scheidt [Wed, 20 Jul 2022 17:11:00 +0000 (12:11 -0500)]
convert generate_enum_variant to use add_variant

23 months agoSupport adding variants via structural editing
Dorian Scheidt [Wed, 20 Jul 2022 17:03:18 +0000 (12:03 -0500)]
Support adding variants via structural editing

23 months agoAuto merge of #12880 - palango:while-fixup, r=Veykril
bors [Tue, 2 Aug 2022 14:08:56 +0000 (14:08 +0000)]
Auto merge of #12880 - palango:while-fixup, r=Veykril

Add syntax fixup for while loops

Part of https://github.com/rust-lang/rust-analyzer/issues/12777

This is a first iteration to gather some feedback. In particular I'm not sure if the curly braces should be added here, but I couldn't get the test to work without them. Any hints welcome!

23 months agoAuto merge of #12919 - jonas-schievink:speling, r=jonas-schievink
bors [Tue, 2 Aug 2022 13:10:12 +0000 (13:10 +0000)]
Auto merge of #12919 - jonas-schievink:speling, r=jonas-schievink

fix: Fix r-a spelling in some places

User-facing change: All commands are now rendered as "rust-analyzer: Command" rather than "Rust Analyzer: Command".

Alternative to https://github.com/rust-lang/rust-analyzer/pull/12910

Potentially controversial, since other extensions don't do this, so I won't self-approve.

23 months agoAuto merge of #12920 - jonas-schievink:arm-release, r=jonas-schievink
bors [Mon, 1 Aug 2022 14:17:53 +0000 (14:17 +0000)]
Auto merge of #12920 - jonas-schievink:arm-release, r=jonas-schievink

feat: Publish extension for 32-bit ARM systems

23 months agoDon't run on PRs
Jonas Schievink [Mon, 1 Aug 2022 14:16:22 +0000 (16:16 +0200)]
Don't run on PRs

23 months agoUpload arm-unknown-linux-gnueabihf build artifact
Laurențiu Nicola [Mon, 1 Aug 2022 13:54:54 +0000 (16:54 +0300)]
Upload arm-unknown-linux-gnueabihf build artifact

23 months agoFix linker env var name
Laurențiu Nicola [Mon, 1 Aug 2022 13:46:18 +0000 (16:46 +0300)]
Fix linker env var name

23 months agoFix target check
Jonas Schievink [Mon, 1 Aug 2022 13:22:02 +0000 (15:22 +0200)]
Fix target check

23 months agoSet linker
Jonas Schievink [Mon, 1 Aug 2022 13:09:45 +0000 (15:09 +0200)]
Set linker

23 months agoPublish extension for 32-bit ARM systems
Jonas Schievink [Mon, 1 Aug 2022 12:26:20 +0000 (14:26 +0200)]
Publish extension for 32-bit ARM systems

23 months agoFix r-a spelling in some places
Jonas Schievink [Mon, 1 Aug 2022 11:47:09 +0000 (13:47 +0200)]
Fix r-a spelling in some places

23 months agoAuto merge of #12918 - lowr:fix/doctest-names, r=Veykril
bors [Mon, 1 Aug 2022 10:12:59 +0000 (10:12 +0000)]
Auto merge of #12918 - lowr:fix/doctest-names, r=Veykril

fix: remove whitespaces from doctest names

When rustdoc runs doctests, it removes whitespaces from the tests' path ([code](https://github.com/rust-lang/rust/blob/25bb1c13bd472b75ceebee3b8dcf4dcbc431a8be/src/librustdoc/doctest.rs#L951)). See https://github.com/rust-lang/rust/pull/89422 for details.

Interestingly enough, "Run doctest" has been working without much problem even though rust-analyzer hasn't followed the change. This is because cargo passes the test name to rustdoc via `--test-args` option, and then rustdoc [splits it by whitespace](https://github.com/rust-lang/rust/blob/25bb1c13bd472b75ceebee3b8dcf4dcbc431a8be/src/librustdoc/config.rs#L513-L514); the last element of the split test name **always** matches the test name that rustdoc generates.

However, it may run other tests unexpectedly (to be precise, this has long since been a thing because of the split). Consider the following example:

```rust
struct A<T, U>(T, U);
struct B<T, U>(T, U);
/// ```
/// doctest here
/// ```
impl<T, U> A<T, U> {}
/// ```
/// doctest here
/// ```
impl<T, U> B<T, U> {}
```

When you "Run doctest" either of the two, rustdoc considers "U>" one of the test specs and both doctests are run. This patch fixes it by following rustdoc and removing the whitespace from the doctests' name.

23 months agofix: remove whitespaces from doctest names
Ryo Yoshida [Mon, 1 Aug 2022 07:48:33 +0000 (16:48 +0900)]
fix: remove whitespaces from doctest names

23 months agoAuto merge of #12915 - lnicola:promote-subtree, r=lnicola
bors [Sun, 31 Jul 2022 17:58:40 +0000 (17:58 +0000)]
Auto merge of #12915 - lnicola:promote-subtree, r=lnicola

internal: Update `xtask promote` and release instructions

Update `xtask` for the subtree workflow. This doesn't explain how to do a `rust -> RA`  sync, since that's definitely more involved, but will probably only happen rarely.

23 months agoAuto merge of #12916 - Veykril:nits, r=Veykril
bors [Sun, 31 Jul 2022 17:42:10 +0000 (17:42 +0000)]
Auto merge of #12916 - Veykril:nits, r=Veykril

minor: Properly cfg the `max` field of Limit

23 months agoGive variables more descriptive names
Lukas Wirth [Sun, 31 Jul 2022 17:27:34 +0000 (19:27 +0200)]
Give variables more descriptive names

23 months agoProperly cfg the `max` field of Limit
Lukas Wirth [Sun, 31 Jul 2022 17:27:20 +0000 (19:27 +0200)]
Properly cfg the `max` field of Limit

23 months agoUpdate xtask promote and release instructions
Laurențiu Nicola [Sun, 31 Jul 2022 17:26:35 +0000 (20:26 +0300)]
Update xtask promote and release instructions

23 months agoAuto merge of #12913 - Veykril:attr-merge, r=Veykril
bors [Sat, 30 Jul 2022 07:53:48 +0000 (07:53 +0000)]
Auto merge of #12913 - Veykril:attr-merge, r=Veykril

fix: Fix ast-id up when merging raw attributes

Fixes https://github.com/rust-lang/rust-analyzer/issues/12912

23 months agofix: Fix ast-id up when merging raw attributes
Lukas Wirth [Sat, 30 Jul 2022 07:43:30 +0000 (09:43 +0200)]
fix: Fix ast-id up when merging raw attributes

23 months agoAuto merge of #12906 - cynecx:fix-completions, r=Veykril
bors [Fri, 29 Jul 2022 15:41:36 +0000 (15:41 +0000)]
Auto merge of #12906 - cynecx:fix-completions, r=Veykril

fix: complete path of existing record expr

23 months agoGenerate rust type from json
hkalbasi [Thu, 28 Jul 2022 18:08:44 +0000 (22:38 +0430)]
Generate rust type from json

23 months agofix: complete path of existing record expr
cynecx [Fri, 29 Jul 2022 00:27:16 +0000 (02:27 +0200)]
fix: complete path of existing record expr

23 months agoAuto merge of #12904 - lnicola:completion-builtin-filter, r=lnicola
bors [Thu, 28 Jul 2022 18:52:00 +0000 (18:52 +0000)]
Auto merge of #12904 - lnicola:completion-builtin-filter, r=lnicola

internal: Be more explicit when filtering built-in completions

We return every built-in type here, but only have `u32` in the tests, so let's look for that one to make tests more reliable across platforms.

23 months agoBe more explicit when filtering built-in completions
Laurențiu Nicola [Thu, 28 Jul 2022 18:45:47 +0000 (21:45 +0300)]
Be more explicit when filtering built-in completions

23 months agoadd debug impl for AnyDiagnostic
hkalbasi [Thu, 28 Jul 2022 18:08:20 +0000 (22:38 +0430)]
add debug impl for AnyDiagnostic

23 months agoAuto merge of #12903 - lnicola:rainbows, r=Veykril
bors [Thu, 28 Jul 2022 18:08:09 +0000 (18:08 +0000)]
Auto merge of #12903 - lnicola:rainbows, r=Veykril

Only run rainbow highlighting test on 64-bit Unix

23 months agoOnly run rainbow highlighting test on 64-bit Unix
Laurențiu Nicola [Thu, 28 Jul 2022 18:02:36 +0000 (21:02 +0300)]
Only run rainbow highlighting test on 64-bit Unix

23 months agoAuto merge of #12902 - Veykril:item-scope, r=Veykril
bors [Thu, 28 Jul 2022 17:38:59 +0000 (17:38 +0000)]
Auto merge of #12902 - Veykril:item-scope, r=Veykril

fix: Order ItemScope::entries results

23 months agofix: Order ItemScope::entries results
Lukas Wirth [Thu, 28 Jul 2022 16:49:31 +0000 (18:49 +0200)]
fix: Order ItemScope::entries results

23 months agoAuto merge of #12901 - Veykril:completion-trait-expr, r=Veykril
bors [Thu, 28 Jul 2022 15:51:30 +0000 (15:51 +0000)]
Auto merge of #12901 - Veykril:completion-trait-expr, r=Veykril

fix: Don't complete marker traits in expression position

cc https://github.com/rust-lang/rust-analyzer/issues/12196

23 months agofix: Don't complete marker traits in expression position
Lukas Wirth [Thu, 28 Jul 2022 15:49:23 +0000 (17:49 +0200)]
fix: Don't complete marker traits in expression position

23 months agoAuto merge of #12900 - pksunkara:master, r=lnicola
bors [Thu, 28 Jul 2022 15:25:07 +0000 (15:25 +0000)]
Auto merge of #12900 - pksunkara:master, r=lnicola

publish: Use cargo ws rename to rename crates

Follow up for #12716

23 months agopublish: Use cargo ws rename to rename crates
Pavan Kumar Sunkara [Thu, 28 Jul 2022 15:21:14 +0000 (16:21 +0100)]
publish: Use cargo ws rename to rename crates