Commit Graph

165110 Commits

Author SHA1 Message Date
bors
f21488a12c Auto merge of #94925 - lcnr:relax-sus-auto-impls, r=estebank
relax `suspicious_auto_trait_impls` lint wrt lifetimes

fixes the warning for https://github.com/rust-lang/rust/issues/93367#issuecomment-1063993489.
2022-03-15 22:54:35 +00:00
skippy10110
e4f1179fa6 Add deprecated_safe feature gate and attribute, cc #94978 2022-03-15 19:48:52 -03:00
Joshua M. Clulow
0dcb1754b6 solaris build environment should include libsendfile/liblgrp
As of version 0.2.120 of the libc crate, the solaris target now requires
some additional libraries to be present in the sysroot.  Note that the
solaris target doesn't really build against files from Solaris, but
rather against some files from DilOS (a platform similar to both Solaris
and illumos).  Pull in the extra libraries and their compilation links
from that apt repository.
2022-03-15 13:46:02 -07:00
bors
52b34550ac Auto merge of #94973 - GuillaumeGomez:more-gui-tests, r=notriddle
Add GUI test to check URLs

The first commit merges both file doing kinda the same thing. Didn't make much sense to keep them separated.

The second commit add checks to ensure the URL has the expected value depending if the search is displayed or not.

r? `@notriddle`
2022-03-15 20:13:35 +00:00
Caio
261d5fc95b Ensure that let_else does not interact with let_chains 2022-03-15 17:00:16 -03:00
Guillaume Gomez
372271e3dd Add URL GUI tests 2022-03-15 20:56:14 +01:00
Guillaume Gomez
8a7b83a24a Merge both "search-result-color" GUI tests 2022-03-15 20:41:24 +01:00
Paolo Gentili
a39d649733 Lint list updated 2022-03-15 19:38:40 +01:00
Nixon Enraght-Moony
26829c03b0 rustdoc-json: Lifetime tests 2022-03-15 18:34:16 +00:00
Nixon Enraght-Moony
dc6b5cb9f3 jsondocck: Better error for invalid @count number 2022-03-15 18:34:16 +00:00
Nixon Enraght-Moony
42b548cf9d rustdoc-json: Add tests for generic fn args and returns 2022-03-15 18:34:16 +00:00
bjorn3
d08d32fa5d Trim down alloc_system.rs
It is used only by a single test. Also remove the dependency on the libc
crate.
2022-03-15 19:25:42 +01:00
bjorn3
5c666ea7ec Remove some unused feature gates 2022-03-15 19:25:33 +01:00
bjorn3
88c3719c68 Avoid once_cell unstable feature in cg_clif.rs 2022-03-15 19:25:33 +01:00
Nixon Enraght-Moony
ccef93fb89 jsondocck: better error for when @set matches multiple items 2022-03-15 18:23:07 +00:00
Nixon Enraght-Moony
4a57399ab0 rustdoc-json: Add test for supertraits 2022-03-15 18:23:07 +00:00
Paolo Gentili
5c1843dbce Moved lint to restriction 2022-03-15 18:45:01 +01:00
bors
83460d5e62 Auto merge of #94966 - matthiaskrgr:rollup-iqzswh3, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #94810 (debuginfo: Fix bug in type name generation for dyn types with associated types but no other generic arguments.)
 - #94947 (fix typos)
 - #94956 (Fix small typo in FIXME)
 - #94958 (Support other types of pluralization in pluralize macro)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-15 16:26:10 +00:00
Matthias Krüger
183262d8d3
Rollup merge of #94958 - est31:pluralize, r=oli-obk
Support other types of pluralization in pluralize macro
2022-03-15 17:15:55 +01:00
Matthias Krüger
32ca1a6e29
Rollup merge of #94956 - martingms:fix-fixme-comment-typo, r=lqd
Fix small typo in FIXME

I introduced a few small typos when linking to an optimizing PR, this PR fixes them.

r? `@lqd`
2022-03-15 17:15:54 +01:00
Matthias Krüger
277802e99a
Rollup merge of #94947 - Dylan-DPC:fix/typos, r=oli-obk
fix typos

Rework of #94603 which got closed as I was trying to unmerge and repush.  This is a subset of changes from the original pr as I sed'd whatever typos I remembered from the original PR

thanks to `@cuishuang` for the original PR
2022-03-15 17:15:53 +01:00
Matthias Krüger
e755f2c7cd
Rollup merge of #94810 - michaelwoerister:fix-trait-pointer-debuginfo-names, r=wesleywiser
debuginfo: Fix bug in type name generation for dyn types with associated types but no other generic arguments.

For types like `&dyn Future<Output=bool>` the compiler currently emits invalid types names in debuginfo. This PR fixes this.

Before:
```txt
// DWARF
&dyn core::future::future::Future, Output=bool>

// CodeView
ref$<dyn$<core::future::future::Future,assoc$<Output,bool> > > >
```

After:
```txt
// DWARF
&dyn core::future::future::Future<Output=bool>

// CodeView
ref$<dyn$<core::future::future::Future<assoc$<Output,bool> > > >
```

These syntactically incorrect type names can cause downstream tools (e.g. debugger extensions) crash when trying to parse them.

r? `@wesleywiser`
2022-03-15 17:15:52 +01:00
dswij
6a3dbe4798 unnecessary_lazy_eval show suggestions on multiline lint 2022-03-15 23:59:26 +08:00
est31
3bf9124f14 Support other types of pluralization in pluralize macro 2022-03-15 15:37:49 +01:00
bors
be52b4af5e Auto merge of #94928 - lcnr:inline-as_substs, r=michaelwoerister
inline `tuple_fields`

more https://github.com/rust-lang/rust/pull/93505 fun, after this i have no idea what might be causing the perf impact.
2022-03-15 13:14:13 +00:00
bjorn3
a900a5229a Download tarballs from github instead of cloning full repos
This saves 40-50s on CI as the repo history can be skipped
2022-03-15 12:44:06 +01:00
zed.zy
7da07ff48b Improve the explanation about the behaviour of read_line 2022-03-15 19:37:52 +08:00
Martin Gammelsæter
0d6e51e6ea Fix small typo in FIXME 2022-03-15 12:04:23 +01:00
bors
040703018c Auto merge of #94261 - michaelwoerister:debuginfo-types-refactor, r=wesleywiser
debuginfo: Refactor debuginfo generation for types

This PR implements the refactoring of the `rustc_codegen_llvm::debuginfo::metadata` module as described in MCP https://github.com/rust-lang/compiler-team/issues/482.

In particular it
- changes names to use `di_node` instead of `metadata`
- uniformly names all functions that build new debuginfo nodes `build_xyz_di_node`
- renames `CrateDebugContext` to `CodegenUnitDebugContext` (which is more accurate)
- removes outdated parts from `compiler/rustc_codegen_llvm/src/debuginfo/doc.md`
- moves `TypeMap` and functions that work directly work with it to a new `type_map` module
- moves enum related builder functions to a new `enums` module
- splits enum debuginfo building for the native and cpp-like cases, since they are mostly separate
- uses `SmallVec` instead of `Vec` in many places
- removes the old infrastructure for dealing with recursion cycles (`create_and_register_recursive_type_forward_declaration()`, `RecursiveTypeDescription`, `set_members_of_composite_type()`, `MemberDescription`, `MemberDescriptionFactory`, `prepare_xyz_metadata()`, etc)
- adds `type_map::build_type_with_children()` as a replacement for dealing with recursion cycles
- adds many (doc-)comments explaining what's going on
- changes cpp-like naming for C-Style enums so they don't get a `enum$<...>` name (because the NatVis visualizer does not apply to them)
- fixes detection of what is a C-style enum because some enums where classified as C-style even though they have fields
- changes cpp-like naming for generator enums so that NatVis works for them
- changes the position of discriminant debuginfo node so it is consistently nested inside the top-level union instead of, sometimes, next to it

The following could be done in subsequent PRs:
- add caching for `closure_saved_names_of_captured_variables`
- add caching for `generator_layout_and_saved_local_names`
- fix inconsistent handling of what is considered a C-style enum wrt to debuginfo
- rename `metadata` module to `types`
- move common generator fields to front instead of appending them

This PR is based on https://github.com/rust-lang/rust/pull/93644 which is not merged yet.

Right now, the changes are all done in one big commit. They could be split into smaller commits but hopefully the list of changes above makes it tractable to review them as a single commit too.

For now: r? `@ghost` (let's see if this affects compile times)
2022-03-15 10:52:32 +00:00
Michael Woerister
aa2408aa84 debuginfo: Refactor debuginfo generation for types -- Make generator-objects test case architecture independent. 2022-03-15 11:45:51 +01:00
bjorn3
af008bdc66 Rustup to rustc 1.61.0-nightly (285fa7ecd 2022-03-14) 2022-03-15 11:21:42 +01:00
Takayuki Maeda
896b113ec3 use format_args_capture in some parts of rustc_parse 2022-03-15 19:17:29 +09:00
bors
b83c6323c7 Auto merge of #8541 - flip1995:iter_with_drain_ambulance, r=giraffate
Move iter_with_drain to nursery

cc #8538 #8539

r? `@giraffate`

changelog: Move [`iter_with_drain`] to nursery
2022-03-15 09:02:38 +00:00
flip1995
b981748036
Move iter_with_drain to nursery 2022-03-15 09:46:49 +01:00
bors
3ba1ebea12 Auto merge of #94938 - lnicola:rust-analyzer-2022-03-14, r=lnicola
⬆️ rust-analyzer

r? `@ghost`
2022-03-15 07:23:50 +00:00
bors
95561b336c Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber
More robust fallback for `use` suggestion

Our old way to suggest where to add `use`s would first look for pre-existing `use`s in the relevant crate/module, and if there are *no* uses, it would fallback on trying to use another item as the basis for the suggestion.

But this was fragile, as illustrated in issue #87613

This PR instead identifies span of the first token after any inner attributes, and uses *that* as the fallback for the `use` suggestion.

Fix #87613
2022-03-15 03:56:33 +00:00
bors
984204814e Auto merge of #92285 - compiler-errors:dyn-proj-bounds, r=nikomatsakis
check ~Projection~ all supertrait bounds when confirming dyn candidate

I'm pretty sure Projection is the only other PredicateKind that we care about enforcing here.

Fixes #80800
2022-03-15 01:31:42 +00:00
bors
71ecbc42f9 Auto merge of #8509 - smoelius:fix-8507, r=giraffate
Fix `unncessary_to_owned` false positive

Fix #8507

changelog: none
2022-03-15 01:08:47 +00:00
Dylan DPC
5ed40229ac fix typos 2022-03-15 02:00:08 +01:00
Dylan DPC
13e889986d fix typos 2022-03-15 02:00:08 +01:00
Michael Goulet
67ef11dc2a check all dyn obligations, actually 2022-03-14 17:59:31 -07:00
Tony Arcieri
78567df575 Stabilize ADX target feature
This is a continuation of #60109, which noted that while the ADX
intrinsics were stabilized, the corresponding target feature never was.

This PR follows the same general structure and stabilizes the ADX target
feature.
2022-03-14 18:56:39 -06:00
bors
9a1f6a9795 Auto merge of #8537 - xFrednet:7923-single-component-path-imports-for-macros, r=llogiq
Allow `single_component_path_imports` for all macros

Closes: https://github.com/rust-lang/rust-clippy/issues/7923

It can be useful to have `use macro_name` regardless of the visibility. This removes the visibility filter.

changelog: [`single_component_path_imports`]: no longer triggers on macros
2022-03-14 23:39:50 +00:00
Michael Goulet
f14a5fd712 check Projection supertrait bounds when confirming dyn candidate 2022-03-14 15:35:06 -07:00
bors
0e1311b70f Auto merge of #8536 - xFrednet:8062-applicability-search-is-some, r=camsteffen
Make `search_is_some`s suggestion `MachineApplicable`

My biggest PR to date, about 0.3 Lines have been changed!

Closes https://github.com/rust-lang/rust-clippy/issues/8062

The suggestion seems to work well, as we've received no error reports since the implementation in December. This PR therefore promotes the suggestion to `MachineApplicable`. The tests already include `.fixed` files :)

changelog: [`search_is_some`]: Make more suggestions `MachineApplicable`
2022-03-14 22:12:25 +00:00
bors
2184c7c568 Auto merge of #94935 - matthiaskrgr:rollup-2o2kyz6, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #90621 (Stabilise `aarch64_target_feature`)
 - #93977 (Type params and assoc types have unit metadata if they are sized)
 - #94670 (Improve `expect` impl and handle `#[expect(unfulfilled_lint_expectations)]` (RFC 2383))
 - #94884 (Fix remaining meta-variable expression TODOs)
 - #94931 (update miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-14 21:51:31 +00:00
xFrednet
2ee5372389
Allow single_component_path_imports for all macros 2022-03-14 22:45:00 +01:00
xFrednet
fc5540a4d3
Make search_is_somes suggestion MachineApplicable 2022-03-14 22:02:10 +01:00
Laurențiu Nicola
ce4eeaf9ea ⬆️ rust-analyzer 2022-03-14 19:04:16 +02:00
Michael Woerister
584855e03d debuginfo: Refactor debuginfo generation for types -- Rename DebugInfoMethods::create_vtable_metadata() to DebugInfoMethods::create_vtable_debuginfo() 2022-03-14 17:25:24 +01:00