typeck: remove leaky nested probe during trait object method resolution
addresses #57673 (but not marking with f-x because thats now afflicting beta channel).
Fix#57216
submodules: update rls and clippy
Changes:
````
Remove state.analysis due to Rust PR #57476
Improve missing nightly readme info
Bump languageserver-types to v0.54.0 and renam crate name to lsp-types
Delete bors.toml
Fix tests
Fix https://github.com/rust-lang/rls/issues/1231
Implement asynchronous message reading
Use typed requests
Implement Tokio-based test LSP client
Update README.md to account for Travis url change
Simplify wait_for_all recv calls
Update dependencies
Revert NLL bug workaround
Remove old test_data entry in .gitignore
Reorganize some tests
Don't test RLS binary target directly
Move tooltip tests to integration tests
Simplify tooltip test harness
Only use FIXTURES_DIR to determine fixtures
Remove src/test/mod.rs
Centralise FIXTURES_DIR across unit and integration tests
Move lens test to tests/
Suppress unused warnings in tests/*
Beautify main.rs and lib.rs
WIP: Move tests
Move src/test/harness to tests/support/harness
Split RLS into bin/lib
Update Clippy
Change all mentions of `rls-preview` to `rls`
Make config mutex borrow scope explicit
Fallback to racer definition
````
Fixes rls build.
Changes:
````
Rustfmt all the things
Don't make decisions on values that don't represent the decision
Rustup
Actually check for constants.
formatting fix
Update clippy_lints/src/needless_bool.rs
formatting fix
needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement
Remove negative integer literal checks.
Fix `implicit_return` false positives.
````
Changes:
````
Remove state.analysis due to Rust PR #57476
Improve missing nightly readme info
Bump languageserver-types to v0.54.0 and renam crate name to lsp-types
Delete bors.toml
Fix tests
Fix https://github.com/rust-lang/rls/issues/1231
Implement asynchronous message reading
Use typed requests
Implement Tokio-based test LSP client
Update README.md to account for Travis url change
Simplify wait_for_all recv calls
Update dependencies
Revert NLL bug workaround
Remove old test_data entry in .gitignore
Reorganize some tests
Don't test RLS binary target directly
Move tooltip tests to integration tests
Simplify tooltip test harness
Only use FIXTURES_DIR to determine fixtures
Remove src/test/mod.rs
Centralise FIXTURES_DIR across unit and integration tests
Move lens test to tests/
Suppress unused warnings in tests/*
Beautify main.rs and lib.rs
WIP: Move tests
Move src/test/harness to tests/support/harness
Split RLS into bin/lib
Update Clippy
Change all mentions of `rls-preview` to `rls`
Make config mutex borrow scope explicit
Fallback to racer definition
````
Fixes rls build.
[rust-gdb] relax the GDB version regex
The pretty-printer script is checking `gdb.VERSION` to see if it's at
least 8.1 for some features. With `re.match`, it will only find the
version at the beginning of that string, but in Fedora the string is
something like "Fedora 8.2-5.fc29". Using `re.search` instead will find
the first location that matches anywhere, so it will find my 8.2.
In particular, the table entries (associated with type-variables
created during the probe) must persist as long as the candidates
assembled during the probe. If you make a nested probe without
creating a nested `ProbeContext`, the table entries are popped at the
end of the nested probe, while the type-variables would leak out via
the assembled candidates attached to `self` (the outer
`ProbeContext`). This causes an ICE (*if you are lucky*)!
const_eval: Predetermine the layout of all locals when pushing a stack frame
Usually the layout of any locals is required at least three times, once
when it becomes live, once when it is written to, and once it is read
from. By adding a cache for them, we can reduce the number of layout
queries speeding up code that is heavy on const_eval.
Fix memory leak in P::filter_map
Probably this function isn't widely used, but anyway this wasn't working as intended.
r? @eddyb
Do not rollup if you want to see if max-rss change in perf.
Default images
Add default rust logo (the image at the top of the sidebar) and default favicon. No more missing image or inexistent icon on the documentation tabs!
r? @QuietMisdreavus
Remove unnecessary dummy span checks
The emitter already verifies wether a given span note or span label
can be emitted to the output. If it can't, because it is a dummy
span, it will be either elided for labels or emitted as an unspanned
note/help when applicable.
Add signed num::NonZeroI* types
Multiple people have asked for them in https://github.com/rust-lang/rust/issues/49137. Given that the unsigned ones already exist, they are very easy to add and not an additional maintenance burden.
The diagnostic for this error prints `the following implementations
were found` followed by the first N relevant impls, sorted.
This commit makes the sort happen before slicing,
so that the set of impls being printed is deterministic
when the input is not.
submodules: update clippy from 1b89724b to e648adf0
Fixes clippy toolstate
Changes:
````
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup https://github.com/rust-lang/rust/pull/57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````
r? @oli-obk
Rollup of 5 pull requests
Successful merges:
- #56796 (Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`)
- #57768 (Continue parsing after parent type args and suggest using angle brackets)
- #57769 (Suggest correct cast for struct fields with shorthand syntax)
- #57783 (Add "dereference boxed value" suggestion.)
- #57784 (Add span for bad doc comment)
Failed merges:
r? @ghost
Install missing 'rust-gdbui''
PR #53774 added `rust-gdbui` as wrapper to launch [gdbui](https://gdbgui.com/), similar to `rust-gdb`.
Unfortunately I've never seen the script in my local installation (from rustup, using rust 1.31.1). @tromey on the PR [suggested it might be missing](https://github.com/rust-lang/rust/pull/53774#issuecomment-419704939) from the installation process.
This PR simply adds a line for `rust-gdbui` too.
Changes:
````
Fixing typo in CONTRIBUTING.md
Fix breakage due to rust-lang/rust#57651
Run rustfmt
Fixed breakage due to rust-lang/rust#57489
Fix breakage due to rust-lang/rust#57755
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup https://github.com/rust-lang/rust/pull/57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````
Add "dereference boxed value" suggestion.
Contributes to #57741.
This PR adds a `help: consider dereferencing the boxed value` suggestion to discriminants of match statements when the match arms have type `T` and the discriminant has type `Box<T>`.
r? @estebank
Suggest correct cast for struct fields with shorthand syntax
```
error[E0308]: mismatched types
--> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
|
LL | let _ = RGB { r, g, b };
| ^ expected f64, found f32
help: you can cast an `f32` to `f64` in a lossless way
|
LL | let _ = RGB { r: r.into(), g, b };
| ^^^^^^^^^^^
```
Fix#52497.
Continue parsing after parent type args and suggest using angle brackets
```
error[E0214]: parenthesized parameters may only be used with a trait
--> $DIR/E0214.rs:2:15
|
LL | let v: Vec(&str) = vec!["foo"];
| ^^^^^^
| |
| only traits may use parentheses
| help: use angle brackets instead: `<&str>`
```
r? @zackmdavis
Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`
This is from this [comment](https://github.com/rust-lang/rust/issues/33417#issuecomment-447111156) I made.
This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
Update cargo
Pull in fix for #57774.
6 commits in ffe65875fd05018599ad07e7389e99050c7915be..907c0febe7045fa02dff2a35c5e36d3bd59ea50d
2019-01-17 23:57:50 +0000 to 2019-01-20 22:31:07 +0000
- Put mtime-on-use behind a feature flag. (rust-lang/cargo#6573)
- Fix a typo in the unstable docs (rust-lang/cargo#6569)
- Perhaps you meant: foo, bar or foobar (rust-lang/cargo#6550)
- Refactor: Create uninstall submodule (rust-lang/cargo#6557)
- Fix spurious Windows errors with switch_features_rerun. (rust-lang/cargo#6561)
- Stop building on master on Travis. (rust-lang/cargo#6562)
r? @Mark-Simulacrum
The emitter already verifies wether a given span note or span label
can be emitted to the output. If it can't, because it is a dummy
span, it will be either elided for labels or emitted as an unspanned
note/help when applicable.
This commit adds a `help: consider dereferencing the boxed value`
suggestion to discriminants of match statements when the match arms have
type `T` and the discriminant has type `Box<T>`.