]> git.lizzy.rs Git - rust.git/log
rust.git
19 months agoFixed some `_i32` notation in `maybe_uninit`’s doc
Elarcis [Sat, 12 Nov 2022 18:22:28 +0000 (19:22 +0100)]
Fixed some `_i32` notation in `maybe_uninit`’s doc

19 months agoAuto merge of #103812 - clubby789:improve-include-bytes, r=petrochenkov
bors [Sat, 12 Nov 2022 14:30:34 +0000 (14:30 +0000)]
Auto merge of #103812 - clubby789:improve-include-bytes, r=petrochenkov

Delay `include_bytes` to AST lowering

Hopefully addresses #65818.
This PR introduces a new `ExprKind::IncludedBytes` which stores the path and bytes of a file included with `include_bytes!()`. We can then create a literal from the bytes during AST lowering, which means we don't need to escape the bytes into valid UTF8 which is the cause of most of the overhead of embedding large binary blobs.

19 months agoAuto merge of #102701 - flba-eb:add_qnx_nostd_support, r=cjgillot
bors [Sat, 12 Nov 2022 11:03:33 +0000 (11:03 +0000)]
Auto merge of #102701 - flba-eb:add_qnx_nostd_support, r=cjgillot

Add tier 3 no_std AArch64/x86_64 support for the QNX Neutrino RTOS

This change allows to compile `no_std` applications for the QNX Neutrino Real-time operating system for ARM 64 bit CPUs.
Tested with QNX Neutrino 7.1.

Partially discussed in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Adding.20QNX.20as.20target).

---

> ## Tier 3 target policy
>
> At this tier, the Rust project provides no official support for a target, so we
place minimal requirements on the introduction of targets.
>
>A proposed new tier 3 target must be reviewed and approved by a member of the
compiler team based on these requirements. The reviewer may choose to gauge
broader compiler team consensus via a [Major Change Proposal (MCP)][MCP].
>
>A proposed target or target-specific patch that substantially changes code
shared with other targets (not just target-specific code) must be reviewed and
approved by the appropriate team for that shared code before acceptance.
>
>- A tier 3 target must have a designated developer or developers (the "target
  maintainers") on record to be CCed when issues arise regarding the target.
  (The mechanism to track and CC such developers may evolve over time.)

See also nto-qnx.md; designated developers are:

- Florian Bartels, `Florian.Bartels@elektrobit.com`, https://github.com/flba-eb
- Tristan Roach, `TRoach@blackberry.com`, https://github.com/gh-tr

> - Targets must use naming consistent with any existing targets; for instance, a
  target for the same CPU or OS as an existing Rust target should use the same
  name for that CPU or OS. Targets should normally use the same names and
  naming conventions as used elsewhere in the broader ecosystem beyond Rust
  (such as in other toolchains), unless they have a very good reason to
  diverge. Changing the name of a target can be highly disruptive, especially
  once the target reaches a higher tier, so getting the name right is important
  even for a tier 3 target.
>  - Target names should not introduce undue confusion or ambiguity unless
    absolutely necessary to maintain ecosystem compatibility. For example, if
    the name of the target makes people extremely likely to form incorrect
    beliefs about what it targets, the name should be changed or augmented to
    disambiguate it.

`aarch64-unknown-nto-qnx7.1.0` and `x86_64-pc-nto-qnx7.1.0` have been chosen as these
strings are used in the official QNX Neutrino toolchain (for `C`/`C++`). It should also
harmonize with the other Rust targets.

The version (`7.1.0 `) is needed because libc needs to distinguish between different
versions (`target_env` is set to `710` for QNX Neutrino 7.1): For example, functions are removed from 7.0
to 7.1, sometimes the signature of functions is slightly changed or size/alignment of structs.
I'm expecting the same for future versions.
This works very well in e.g. `libc` (tested with 7.0 which I'm not going to support).

> - Tier 3 targets may have unusual requirements to build or use, but must not
  create legal issues or impose onerous legal terms for the Rust project or for
  Rust developers or users.
>  - The target must not introduce license incompatibilities.

No issue as far as I can see.

>  - Anything added to the Rust repository must be under the standard Rust
    license (`MIT OR Apache-2.0`).

Ok

>  - The target must not cause the Rust tools or libraries built for any other
    host (even when supporting cross-compilation to the target) to depend
    on any new dependency less permissive than the Rust licensing policy. This
    applies whether the dependency is a Rust crate that would require adding
    new license exceptions (as specified by the `tidy` tool in the
    rust-lang/rust repository), or whether the dependency is a native library
    or binary. In other words, the introduction of the target must not cause a
    user installing or running a version of Rust or the Rust tools to be
    subject to any new license requirements.

No change for host tools. When cross-compiling for QNX Neutrino, the compiler/linker
driver "qcc" is called. It should be possible (but not tested) to use other
(OSS) compilers/linkers to produce working binaries.

>  - Compiling, linking, and emitting functional binaries, libraries, or other
    code for the target (whether hosted on the target itself or cross-compiling
    from another target) must not depend on proprietary (non-FOSS) libraries.
    Host tools built for the target itself may depend on the ordinary runtime
    libraries supplied by the platform and commonly used by other applications
    built for the target, but those libraries must not be required for code
    generation for the target; cross-compilation to the target must not require
    such libraries at all. For instance, `rustc` built for the target may
    depend on a common proprietary C runtime library or console output library,
    but must not depend on a proprietary code generation library or code
    optimization library. Rust's license permits such combinations, but the
    Rust project has no interest in maintaining such combinations within the
    scope of Rust itself, even at tier 3.

Only rustc is required for code generation (i.e. no additional libraries to
generate code). Linking of executables requires the ordinary runtime libraries
`crt` and `libc`.

>  - "onerous" here is an intentionally subjective term. At a minimum, "onerous"
    legal/licensing terms include but are *not* limited to: non-disclosure
    requirements, non-compete requirements, contributor license agreements
    (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms,
    requirements conditional on the employer or employment of any particular
    Rust developers, revocable terms, any requirements that create liability
    for the Rust project or its developers or users, or any requirements that
    adversely affect the livelihood or prospects of the Rust project or its
    developers or users.
>- Neither this policy nor any decisions made regarding targets shall create any
  binding agreement or estoppel by any party. If any member of an approving
  Rust team serves as one of the maintainers of a target, or has any legal or
  employment requirement (explicit or implicit) that might affect their
  decisions regarding a target, they must recuse themselves from any approval
  decisions regarding the target's tier status, though they may otherwise
  participate in discussions.
>  - This requirement does not prevent part or all of this policy from being
    cited in an explicit contract or work agreement (e.g. to implement or
    maintain support for a target). This requirement exists to ensure that a
    developer or team responsible for reviewing and approving a target does not
    face any legal threats or obligations that would prevent them from freely
    exercising their judgment in such approval, even if such judgment involves
    subjective matters or goes beyond the letter of these requirements.

I see no issues with any of the above.

>- Tier 3 targets should attempt to implement as much of the standard libraries
  as possible and appropriate (`core` for most targets, `alloc` for targets
  that can support dynamic memory allocation, `std` for targets with an
  operating system or equivalent layer of system-provided functionality), but
  may leave some code unimplemented (either unavailable or stubbed out as
  appropriate), whether because the target makes it impossible to implement or
  challenging to implement. The authors of pull requests are not obligated to
  avoid calling any portions of the standard library on the basis of a tier 3
  target not implementing those portions.

`core` and `alloc` should be working (no change required). `std` implementation
is ongoing and will be provided separately.

>- The target must provide documentation for the Rust community explaining how
  to build for the target, using cross-compilation if possible. If the target
  supports running binaries, or running tests (even if they do not pass), the
  documentation must explain how to run such binaries or tests for the target,
  using emulation if possible or dedicated hardware if necessary.

see nto-qnx.md

>- Tier 3 targets must not impose burden on the authors of pull requests, or
  other developers in the community, to maintain the target. In particular,
  do not post comments (automated or manual) on a PR that derail or suggest a
  block on the PR based on a tier 3 target. Do not send automated messages or
  notifications (via any medium, including via ``@`)` to a PR author or others
  involved with a PR regarding a tier 3 target, unless they have opted into
  such messages.
>  - Backlinks such as those generated by the issue/PR tracker when linking to
    an issue or PR are not considered a violation of this policy, within
    reason. However, such messages (even on a separate repository) must not
    generate notifications to anyone involved with a PR who has not requested
    such notifications.

Ok

>- Patches adding or updating tier 3 targets must not break any existing tier 2
  or tier 1 target, and must not knowingly break another tier 3 target without
  approval of either the compiler team or the maintainers of the other tier 3
  target.
>  - In particular, this may come up when working on closely related targets,
    such as variations of the same architecture with different features. Avoid
    introducing unconditional uses of features that another variation of the
    target may not have; use conditional compilation or runtime detection, as
    appropriate, to let each target run code supported by that target.

Ok

19 months agoRemove example code as it does not compile in CI
Florian Bartels [Sat, 12 Nov 2022 08:25:34 +0000 (09:25 +0100)]
Remove example code as it does not compile in CI

Code is QNX/nto specific and will not link on Windows.

19 months agoAuto merge of #104310 - Dylan-DPC:rollup-wgt1z4a, r=Dylan-DPC
bors [Sat, 12 Nov 2022 08:03:01 +0000 (08:03 +0000)]
Auto merge of #104310 - Dylan-DPC:rollup-wgt1z4a, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #102049 (Add the `#[derive_const]` attribute)
 - #103970 (Unhide unknown spans)
 - #104206 (Remove `save_and_restore_in_snapshot_flag`, use `ObligationCtxt` more)
 - #104214 (Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures)
 - #104267 (rustdoc: use checkbox instead of switch for settings toggles)
 - #104302 (Update cargo)
 - #104303 (UI tests can be assigned to T-compiler)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #104303 - compiler-errors:ui-test-triagebot, r=Mark-Simulacrum
Dylan DPC [Sat, 12 Nov 2022 06:32:54 +0000 (12:02 +0530)]
Rollup merge of #104303 - compiler-errors:ui-test-triagebot, r=Mark-Simulacrum

UI tests can be assigned to T-compiler

It's my understanding that while not *all* `src/test/ui` tests are compiler-related, the bulk of them are, so I think it makes sense for this to go to the compiler triagebot category (T-compiler and T-compiler-contributors) instead of fallback, which consists of just `@Mark-Simulacrum.` Though if anyone diagrees, feel free to close this PR.

20 months agoRollup merge of #104302 - weihanglo:update-cargo, r=weihanglo
Dylan DPC [Sat, 12 Nov 2022 06:32:53 +0000 (12:02 +0530)]
Rollup merge of #104302 - weihanglo:update-cargo, r=weihanglo

Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ````@ghost````

20 months agoRollup merge of #104267 - notriddle:notriddle/checkbox, r=GuillaumeGomez
Dylan DPC [Sat, 12 Nov 2022 06:32:53 +0000 (12:02 +0530)]
Rollup merge of #104267 - notriddle:notriddle/checkbox, r=GuillaumeGomez

rustdoc: use checkbox instead of switch for settings toggles

Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html

## Before

![image](https://user-images.githubusercontent.com/1593513/201232887-dee27ef5-b091-49bb-be4a-103d2e7983f3.png)

## After

![image](https://user-images.githubusercontent.com/1593513/201232835-95b40b77-6535-4280-8719-44c992a07772.png)

## Description

The switch ("slider") is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway.

Also, while switches are the exclusive toggle design on iOS (since [Apple HIG] reserves checkboxes for Mac only), the [Google Material] guidelines say that lists of switches are bad, and you should just use check boxes.

[Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles
[Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185

20 months agoRollup merge of #104214 - Nilstrieb:returns_impl_Ice, r=compiler-errors
Dylan DPC [Sat, 12 Nov 2022 06:32:52 +0000 (12:02 +0530)]
Rollup merge of #104214 - Nilstrieb:returns_impl_Ice, r=compiler-errors

Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures

Previously, a `delay_span_bug` was isssued, failing normalization. This create a `TyKind::Error` in the signature, which caused `compare_predicate_entailment` to swallow its signature mismatch error, causing ICEs because no error was emitted.

fixes #104183

r? ``@compiler-errors``

20 months agoRollup merge of #104206 - compiler-errors:ocx-more-2, r=lcnr
Dylan DPC [Sat, 12 Nov 2022 06:32:52 +0000 (12:02 +0530)]
Rollup merge of #104206 - compiler-errors:ocx-more-2, r=lcnr

Remove `save_and_restore_in_snapshot_flag`, use `ObligationCtxt` more

r? ```@lcnr```

20 months agoRollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebank
Dylan DPC [Sat, 12 Nov 2022 06:32:51 +0000 (12:02 +0530)]
Rollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebank

Unhide unknown spans

r? ```@estebank```

20 months agoRollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obk
Dylan DPC [Sat, 12 Nov 2022 06:32:50 +0000 (12:02 +0530)]
Rollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obk

Add the `#[derive_const]` attribute

Closes #102371. This is a minimal patchset for the attribute to work. There are no restrictions on what traits this attribute applies to.

r? `````@oli-obk`````

20 months agoAuto merge of #103530 - cjgillot:hir-lifetimes-direct, r=estebank
bors [Sat, 12 Nov 2022 05:22:17 +0000 (05:22 +0000)]
Auto merge of #103530 - cjgillot:hir-lifetimes-direct, r=estebank

Resolve lifetimes independently for each item-like.

Now that the heavy-lifting is done on the AST and during lowering, we do not need to perform HIR lifetime resolution on a full item at once.  Instead, we can treat each item-like independently, and look at `generics_of` the parent exceptionally for associated items.

20 months agoAuto merge of #103150 - joboet:remove_lock_wrappers, r=m-ou-se
bors [Sat, 12 Nov 2022 01:31:39 +0000 (01:31 +0000)]
Auto merge of #103150 - joboet:remove_lock_wrappers, r=m-ou-se

Remove lock wrappers in `sys_common`

This moves the lazy allocation to `sys` (SGX and UNIX). While this leads to a bit more verbosity, it will simplify future improvements by making room in `sys_common` for platform-independent implementations.

This also removes the condvar check on SGX as it is not necessary for soundness and will be removed anyway once mutex has been made movable.

For simplicity's sake, `libunwind` also uses lazy allocation now on SGX. This will require an update to the C definitions before merging this (CC `@raoulstrackx).`

r? `@m-ou-se`

20 months agoUI tests can be assigned to T-compiler
Michael Goulet [Fri, 11 Nov 2022 22:16:14 +0000 (22:16 +0000)]
UI tests can be assigned to T-compiler

20 months agoUpdate cargo
Weihang Lo [Fri, 11 Nov 2022 22:07:29 +0000 (22:07 +0000)]
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497
2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

20 months agoAuto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearth
bors [Fri, 11 Nov 2022 20:11:07 +0000 (20:11 +0000)]
Auto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearth

Rollup of 8 pull requests

Successful merges:

 - #95292 (Allow specialized const trait impls.)
 - #100386 (Make `Sized` coinductive, again)
 - #102215 (Implement the `+whole-archive` modifier for `wasm-ld`)
 - #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code)
 - #103531 (Suggest calling the instance method of the same name when method not found)
 - #103960 (piece of diagnostic migrate)
 - #104051 (update Miri)
 - #104129 (rustdoc: use javascript to layout notable traits popups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoAuto merge of #104289 - Dylan-DPC:rollup-v7wei2t, r=Dylan-DPC
bors [Fri, 11 Nov 2022 17:29:10 +0000 (17:29 +0000)]
Auto merge of #104289 - Dylan-DPC:rollup-v7wei2t, r=Dylan-DPC

Rollup of 9 pull requests

Successful merges:

 - #100633 (Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`)
 - #103445 (`#[test]`: Point at return type if `Termination` bound is unsatisfied)
 - #103924 (Fix broken link in description of error code E0706)
 - #104146 (Retry binding TCP Socket in remote-test-server)
 - #104169 (Migrate `:target` rules to use CSS variables)
 - #104202 (Fix ICE #103748)
 - #104216 (Don't ICE on operator trait methods with generic methods)
 - #104217 (Display help message when fluent arg was referenced incorrectly)
 - #104245 (Reduce default configuration's dependency upon static libstdcpp library (#103606))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait, r=Manishearth
Manish Goregaokar [Fri, 11 Nov 2022 17:12:31 +0000 (12:12 -0500)]
Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait, r=Manishearth

rustdoc: use javascript to layout notable traits popups

Fixes #102576

Preview: https://notriddle.com/notriddle-rustdoc-demos/102576-js-notable-trait/std/iter/trait.Iterator.html#method.step_by

## Before

![image](https://user-images.githubusercontent.com/1593513/200432713-23aa8d49-ba2b-469f-9eab-089e0c174039.png)

## After

![image](https://user-images.githubusercontent.com/1593513/200432735-edd5b53d-e99d-4fc5-9410-8a79e0efdc9d.png)

20 months agoRollup merge of #104051 - RalfJung:miri, r=RalfJung
Manish Goregaokar [Fri, 11 Nov 2022 17:12:31 +0000 (12:12 -0500)]
Rollup merge of #104051 - RalfJung:miri, r=RalfJung

update Miri

Notable PRs:
- https://github.com/rust-lang/miri/pull/2636
- https://github.com/rust-lang/miri/pull/2641
- https://github.com/rust-lang/miri/pull/2638

20 months agoRollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwco
Manish Goregaokar [Fri, 11 Nov 2022 17:12:30 +0000 (12:12 -0500)]
Rollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwco

piece of diagnostic migrate

r? `@davidtwco`

20 months agoRollup merge of #103531 - chenyukang:yukang/fix-103474, r=estebank
Manish Goregaokar [Fri, 11 Nov 2022 17:12:30 +0000 (12:12 -0500)]
Rollup merge of #103531 - chenyukang:yukang/fix-103474, r=estebank

Suggest calling the instance method of the same name when method not found

Fixes #103474

20 months agoRollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, r=estebank
Manish Goregaokar [Fri, 11 Nov 2022 17:12:29 +0000 (12:12 -0500)]
Rollup merge of #103468 - chenyukang:yukang/fix-103435-extra-parentheses, r=estebank

Fix unused lint and parser caring about spaces to won't produce invalid code

Fixes #103435

20 months agoRollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebank
Manish Goregaokar [Fri, 11 Nov 2022 17:12:29 +0000 (12:12 -0500)]
Rollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebank

Implement the `+whole-archive` modifier for `wasm-ld`

This implements the `Linker::{link_whole_staticlib,link_whole_rlib}` methods for the `WasmLd` linker used on wasm targets. Previously these methods were noops since I think historically `wasm-ld` did not have support for `--whole-archive` but nowadays it does, so the flags are passed through.

20 months agoRollup merge of #100386 - compiler-errors:sized-coinductive-redux, r=lcnr
Manish Goregaokar [Fri, 11 Nov 2022 17:12:28 +0000 (12:12 -0500)]
Rollup merge of #100386 - compiler-errors:sized-coinductive-redux, r=lcnr

Make `Sized` coinductive, again

A revival of #83647

---

What exactly makes co-induction sound? Better question: are there any unsoundness risks from this? `Sized` can't be implemented by custom `impl` blocks, nor can it be conditionally implemented based on anything other than child fields being `Sized`, right?

r? `@nikomatsakis` for whenever he gets back from vacation

20 months agoRollup merge of #95292 - BGR360:const-trait-specialize, r=lcnr
Manish Goregaokar [Fri, 11 Nov 2022 17:12:27 +0000 (12:12 -0500)]
Rollup merge of #95292 - BGR360:const-trait-specialize, r=lcnr

Allow specialized const trait impls.

Fixes #95186.
Fixes #95187.

I've done my best to create a comprehensive test suite for the interaction between `min_specialization` and `const_trait_impls`. I wouldn't be surprised if there are interesting cases I haven't tested, please let me know.

20 months agorustdoc: fix HTML validation failure by escaping `data-ty`
Michael Howell [Fri, 11 Nov 2022 14:35:09 +0000 (07:35 -0700)]
rustdoc: fix HTML validation failure by escaping `data-ty`

20 months agorustdoc: add test cases for checkbox toggles
Michael Howell [Fri, 11 Nov 2022 16:57:58 +0000 (09:57 -0700)]
rustdoc: add test cases for checkbox toggles

20 months agoIntroduce `ExprKind::IncludedBytes`
clubby789 [Mon, 31 Oct 2022 18:30:09 +0000 (18:30 +0000)]
Introduce `ExprKind::IncludedBytes`

20 months agoAdd Tristan as maintainer
Florian Bartels [Fri, 11 Nov 2022 15:29:33 +0000 (16:29 +0100)]
Add Tristan as maintainer

20 months agoRollup merge of #104245 - kubycsolutions:master, r=jyn514
Dylan DPC [Fri, 11 Nov 2022 15:21:42 +0000 (20:51 +0530)]
Rollup merge of #104245 - kubycsolutions:master, r=jyn514

Reduce default configuration's dependency upon static libstdcpp library (#103606)

Fixes #103606

Remove default dependency on static libstdcpp except during dist llvm builds (where we want static libraries so `libLLVM.so` is self-contained).

20 months agoRollup merge of #104217 - Nilstrieb:funny-dollar-syntax, r=TaKO8Ki
Dylan DPC [Fri, 11 Nov 2022 15:21:41 +0000 (20:51 +0530)]
Rollup merge of #104217 - Nilstrieb:funny-dollar-syntax, r=TaKO8Ki

Display help message when fluent arg was referenced incorrectly

The fluent argument syntax is a little special and easy to get wrong, so we emit a small help message when someone gets it wrong.

Example:
```
parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}`
```
panics with
```
thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter`
help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead
attr: `None`
args: `FluentArgs([("delimiter", String("}"))])`
errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21
```

fixes #103539

20 months agoRollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebank
Dylan DPC [Fri, 11 Nov 2022 15:21:41 +0000 (20:51 +0530)]
Rollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebank

Don't ICE on operator trait methods with generic methods

Emit a fatal error instead.
fixes #104213

20 months agoRollup merge of #104202 - camsteffen:103748, r=estebank
Dylan DPC [Fri, 11 Nov 2022 15:21:40 +0000 (20:51 +0530)]
Rollup merge of #104202 - camsteffen:103748, r=estebank

Fix ICE #103748

Fixes #103748

20 months agoRollup merge of #104169 - GuillaumeGomez:migrate-css-target, r=notriddle
Dylan DPC [Fri, 11 Nov 2022 15:21:40 +0000 (20:51 +0530)]
Rollup merge of #104169 - GuillaumeGomez:migrate-css-target, r=notriddle

Migrate `:target` rules to use CSS variables

There should be no GUI changes.

r? `@notriddle`

20 months agoRollup merge of #104146 - Ayush1325:remote-test-server, r=jyn514
Dylan DPC [Fri, 11 Nov 2022 15:21:39 +0000 (20:51 +0530)]
Rollup merge of #104146 - Ayush1325:remote-test-server, r=jyn514

Retry binding TCP Socket in remote-test-server

This allows retrying binding TCP Socket multiple times. This is useful when using emulators as network might not be available in the beginning.

This was orignally implemented in https://github.com/rust-lang/rust/pull/100316

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
20 months agoRollup merge of #103924 - PeteDevoy:patch-1, r=estebank
Dylan DPC [Fri, 11 Nov 2022 15:21:39 +0000 (20:51 +0530)]
Rollup merge of #103924 - PeteDevoy:patch-1, r=estebank

Fix broken link in description of error code E0706

Corresponding subsection in async book is `07.05` not `07.06`.

The information on the linked page is the same so it may be reasonable to remove the whole sentence.

20 months agoRollup merge of #103445 - fmease:fix-50291, r=estebank
Dylan DPC [Fri, 11 Nov 2022 15:21:38 +0000 (20:51 +0530)]
Rollup merge of #103445 - fmease:fix-50291, r=estebank

`#[test]`: Point at return type if `Termination` bound is unsatisfied

Together with #103142 (already merged) this fully fixes #50291.

I don't consider my current solution of changing a few spans “here and there” very clean since the\rfailed obligation is a `FunctionArgumentObligation` and we point at a type instead of a function argument.

If you agree with me on this point, I can offer to keep the spans of the existing nodes and instead inject\r`let _: AssertRetTyIsTermination<$ret_ty>;` (type to be defined in `libtest`) similar to `AssertParamIsEq` etc.\rused by some built-in derive-macros.

I haven't tried that approach yet though and cannot promise that it would actually work out or\rbe “cleaner” for that matter.

````@rustbot```` label A-libtest A-diagnostics
r? ````@estebank````

20 months agoRollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandry
Dylan DPC [Fri, 11 Nov 2022 15:21:38 +0000 (20:51 +0530)]
Rollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandry

Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`

No longer lint against `#[must_use] async fn foo()`.

When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.

Fix #78149.

20 months agoPrint all labels, even if they have no span. Fall back to main item's span.
Oli Scherer [Fri, 4 Nov 2022 16:04:47 +0000 (16:04 +0000)]
Print all labels, even if they have no span. Fall back to main item's span.

20 months agoDon't add message that will never be shown to users
Oli Scherer [Fri, 11 Nov 2022 14:45:18 +0000 (14:45 +0000)]
Don't add message that will never be shown to users

It will still be used in json, as seen by the ui test changes

20 months agoRemove some redundant arguments
Oli Scherer [Thu, 3 Nov 2022 17:06:41 +0000 (17:06 +0000)]
Remove some redundant arguments

20 months agoAuto merge of #102872 - mikebenfield:better-get-discr, r=nagisa
bors [Fri, 11 Nov 2022 13:50:32 +0000 (13:50 +0000)]
Auto merge of #102872 - mikebenfield:better-get-discr, r=nagisa

rustc_codegen_ssa: Better code generation for niche discriminants.

In some cases we can avoid arithmetic before checking whether a niche is a tag.

Also rename some identifiers around niches.

This is relevant to #101872

20 months agoClean-up formatting.
Camille GILLOT [Fri, 11 Nov 2022 10:32:49 +0000 (10:32 +0000)]
Clean-up formatting.

20 months agoVisit opaque types during type collection too.
Camille GILLOT [Fri, 11 Nov 2022 10:29:27 +0000 (10:29 +0000)]
Visit opaque types during type collection too.

20 months agoResolve lifetimes using the regular logic for RPIT.
Camille GILLOT [Tue, 25 Oct 2022 16:10:19 +0000 (16:10 +0000)]
Resolve lifetimes using the regular logic for RPIT.

20 months agoResolve lifetimes independently for each item-like.
Camille GILLOT [Tue, 25 Oct 2022 15:08:20 +0000 (15:08 +0000)]
Resolve lifetimes independently for each item-like.

20 months agoTweak signatures in rustc_middle::hir::map.
Camille GILLOT [Tue, 25 Oct 2022 15:07:56 +0000 (15:07 +0000)]
Tweak signatures in rustc_middle::hir::map.

20 months agoAdd `nto` as known `target_os`
Florian Bartels [Wed, 5 Oct 2022 10:32:22 +0000 (12:32 +0200)]
Add `nto` as known `target_os`

20 months agoAdd no_std AArch64 support for the QNX Neutrino (nto) 7.1 RTOS
Florian Bartels [Mon, 5 Sep 2022 08:56:06 +0000 (10:56 +0200)]
Add no_std AArch64 support for the QNX Neutrino (nto) 7.1 RTOS

This change allows to compile no_std applications for the QNX Neutrino
realtime operating system for ARM 64 bit CPUs.
Tested with QNX Neutrino 7.1.

20 months agorustc_codegen_ssa: Better code generation for niche discriminants.
Michael Benfield [Mon, 10 Oct 2022 17:29:38 +0000 (17:29 +0000)]
rustc_codegen_ssa: Better code generation for niche discriminants.

In some cases we can avoid arithmetic before checking whether a niche
represents an untagged variant.

This is relevant to #101872

20 months agoAuto merge of #103898 - Nilstrieb:match-macro, r=nnethercote
bors [Fri, 11 Nov 2022 04:54:59 +0000 (04:54 +0000)]
Auto merge of #103898 - Nilstrieb:match-macro, r=nnethercote

Retry failed macro matching for diagnostics

When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439.

You made a bunch of changes to declarative macro matching, so
r? `@nnethercote`

This change should produce a few small perf wins: https://github.com/rust-lang/rust/pull/103439#issuecomment-1294249602

20 months agoOops, bless this test.
Ben Reeves [Fri, 11 Nov 2022 04:14:08 +0000 (22:14 -0600)]
Oops, bless this test.

20 months agoFix tests after rebase
Esteban Küber [Fri, 11 Nov 2022 03:01:33 +0000 (19:01 -0800)]
Fix tests after rebase

20 months agoAuto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank
bors [Fri, 11 Nov 2022 02:07:52 +0000 (02:07 +0000)]
Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank

Recover wrong-cased keywords that start items

(_this pr was inspired by [this tweet](https://twitter.com/Azumanga/status/1552982326409367561)_)

r? `@estebank`

We've talked a bit about this recovery, but I just wanted to make sure that this is the right approach :)

For now I've only added the case insensitive recovery to `use`s, since most other items like `impl` blocks, modules, functions can start with multiple keywords which complicates the matter.

20 months agoreview comments
Esteban Küber [Wed, 17 Aug 2022 15:21:43 +0000 (08:21 -0700)]
review comments

20 months agoConsider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`
Esteban Küber [Tue, 16 Aug 2022 14:56:42 +0000 (07:56 -0700)]
Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`

No longer lint against `#[must_use] async fn foo()`.

When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.

Fix #78149.

20 months agoTweak span for `#[must_use]`
Esteban Küber [Tue, 16 Aug 2022 14:46:33 +0000 (07:46 -0700)]
Tweak span for `#[must_use]`

Do not point at whole statement, only at the expression (skip pointing at `;`)

20 months agoAvoid runtime dependency on static libstdc++
kubycsolutions [Wed, 9 Nov 2022 22:26:25 +0000 (17:26 -0500)]
Avoid runtime dependency on static libstdc++

Usually, we do want to use the static C++ library when building rustc_llvm, but do not want to have that dependency at compiler runtime. Change the defaults to Make It So.

20 months agorustdoc: use checkbox instead of switch for settings toggles
Michael Howell [Thu, 10 Nov 2022 23:51:14 +0000 (16:51 -0700)]
rustdoc: use checkbox instead of switch for settings toggles

The switch is designed to give the application a "physical" feel, but
nothing else in here really followed through. They didn't support the
"flick" gesture that real iOS switches support, and the radio
buttons that were also used in Rustdoc Settings were a more "classic"
form element anyway.

Also, while "switches" are the exclusive toggle design on iOS (since
[Apple HIG] reserves checkboxes for Mac only), the [Google Material]
guidelines say that lists of switches are bad, and you should just use
check boxes.

[Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles
[Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185

20 months agoMore nits
Michael Goulet [Thu, 10 Nov 2022 21:29:20 +0000 (21:29 +0000)]
More nits

20 months agobless tests
Michael Goulet [Wed, 10 Aug 2022 16:47:26 +0000 (16:47 +0000)]
bless tests

20 months agoadd some more tests
lcnr [Tue, 27 Apr 2021 12:24:19 +0000 (14:24 +0200)]
add some more tests

20 months agomake `Sized` coinductive
lcnr [Mon, 29 Mar 2021 15:32:20 +0000 (17:32 +0200)]
make `Sized` coinductive

20 months agoAuto merge of #104164 - cjgillot:u64-cache, r=compiler-errors
bors [Thu, 10 Nov 2022 20:13:42 +0000 (20:13 +0000)]
Auto merge of #104164 - cjgillot:u64-cache, r=compiler-errors

Use 64 bits for incremental cache in-file positions

We currently use a 32-bit integer to encode byte positions into the incremental cache.
This is not enough when the query chache file is >4GB.

As the overflow check was a `debug_assert`, it was removed in released compilers, making compilation succeed silently.
At the next compilation, cache decoding would try to read unrelated data because of garbled file position, triggering an ICE.

Fixes https://github.com/rust-lang/rust/issues/79786
(I'm closing that bug since it the original report and the subsequent questions are probably different instances. A new bug should be opened for new instances of that ICE.)

20 months agoApply PR feedback.
Ben Reeves [Thu, 10 Nov 2022 18:56:09 +0000 (12:56 -0600)]
Apply PR feedback.

20 months agoRequire `~const` qualifier on trait bounds in specializing impls if present in base...
Ben Reeves [Sun, 6 Nov 2022 06:07:06 +0000 (01:07 -0500)]
Require `~const` qualifier on trait bounds in specializing impls if present in base impl.

20 months agoAdd #[const_trait] where needed in tests.
Ben Reeves [Sun, 6 Nov 2022 04:12:57 +0000 (23:12 -0500)]
Add #[const_trait] where needed in tests.

20 months agoDisallow specializing on const impls with non-const impls.
Ben Reeves [Wed, 14 Sep 2022 03:18:14 +0000 (22:18 -0500)]
Disallow specializing on const impls with non-const impls.

20 months agoAllow specialized const trait impls.
Ben Reeves [Fri, 25 Mar 2022 00:24:40 +0000 (19:24 -0500)]
Allow specialized const trait impls.

Fixes #95186.
Fixes #95187.

20 months agoAdd GUI test for :target
Guillaume Gomez [Tue, 8 Nov 2022 20:12:41 +0000 (21:12 +0100)]
Add GUI test for :target

20 months agoMigrate :target rules to use CSS variables
Guillaume Gomez [Tue, 8 Nov 2022 20:12:17 +0000 (21:12 +0100)]
Migrate :target rules to use CSS variables

20 months agoupdate debuginfo check
joboet [Sun, 6 Nov 2022 20:44:33 +0000 (21:44 +0100)]
update debuginfo check

20 months agoAuto merge of #104246 - Manishearth:rollup-9o3txc7, r=Manishearth
bors [Thu, 10 Nov 2022 16:22:59 +0000 (16:22 +0000)]
Auto merge of #104246 - Manishearth:rollup-9o3txc7, r=Manishearth

Rollup of 9 pull requests

Successful merges:

 - #101939 (Add loongarch64 abi support)
 - #103863 (Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor)
 - #104036 (Suggest `is_some` when we've found `Option` but expected `bool`)
 - #104060 (Make `Hash`, `Hasher` and `BuildHasher` `#[const_trait]` and make `Sip` const `Hasher`)
 - #104077 (Use aapcs for efiapi calling convention on arm)
 - #104186 (Tighten the 'introduce new binding' suggestion)
 - #104194 (`EarlyBinder` docs)
 - #104233 (Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor`)
 - #104235 (Use `const_error_with_guaranteed` more)

Failed merges:

 - #104078 (Print "Checking/Building ..." message even when --dry-run is passed)
 - #104169 (Migrate `:target` rules to use CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #104235 - compiler-errors:more-ct-guar, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:42 +0000 (10:47 -0500)]
Rollup merge of #104235 - compiler-errors:more-ct-guar, r=oli-obk

Use `const_error_with_guaranteed` more

Better to pass down an ErrorGuaranteed rather than making a new one out of thin air, for some usages. Also for the ones where we *do* need to delay a bug, that delayed bug will have a more descriptive message.

20 months agoRollup merge of #104233 - compiler-errors:issue-104209, r=lcnr
Manish Goregaokar [Thu, 10 Nov 2022 15:47:41 +0000 (10:47 -0500)]
Rollup merge of #104233 - compiler-errors:issue-104209, r=lcnr

Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor`

Fixes #104209

20 months agoRollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors
Manish Goregaokar [Thu, 10 Nov 2022 15:47:41 +0000 (10:47 -0500)]
Rollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors

`EarlyBinder` docs

20 months agoRollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:40 +0000 (10:47 -0500)]
Rollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, r=oli-obk

Tighten the 'introduce new binding' suggestion

Fixes #104086

20 months agoRollup merge of #104077 - nicholasbishop:bishop-uefi-aapcs, r=nagisa
Manish Goregaokar [Thu, 10 Nov 2022 15:47:39 +0000 (10:47 -0500)]
Rollup merge of #104077 - nicholasbishop:bishop-uefi-aapcs, r=nagisa

Use aapcs for efiapi calling convention on arm

On arm, [llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets](https://github.com/rust-lang/compiler-builtins/issues/116#issuecomment-261057422). UEFI specifies in the arm calling convention that [floating point extensions aren't used](https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention), so always translate `efiapi` to `aapcs` on arm.

https://github.com/rust-lang/rust/issues/65815

20 months agoRollup merge of #104060 - ink-feather-org:const_hash, r=fee1-dead
Manish Goregaokar [Thu, 10 Nov 2022 15:47:38 +0000 (10:47 -0500)]
Rollup merge of #104060 - ink-feather-org:const_hash, r=fee1-dead

Make `Hash`, `Hasher` and `BuildHasher` `#[const_trait]` and make `Sip` const `Hasher`

This PR enables using Hashes in const context.

r? ``@fee1-dead``

20 months agoRollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkov
Manish Goregaokar [Thu, 10 Nov 2022 15:47:38 +0000 (10:47 -0500)]
Rollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkov

Suggest `is_some` when we've found `Option` but expected `bool`

Thanks `@lunasorcery` for the suggestion.

20 months agoRollup merge of #103863 - compiler-errors:fulfillcx-less, r=wesleywiser
Manish Goregaokar [Thu, 10 Nov 2022 15:47:37 +0000 (10:47 -0500)]
Rollup merge of #103863 - compiler-errors:fulfillcx-less, r=wesleywiser

Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor

Most places that are constructing a `FulfillmentContext` should be constructing a `TraitEngine` generically, so later on if/when we're transitioning it'll be easier.

Logical extension of #99746

20 months agoRollup merge of #101939 - zhaixiaojuan:loongarch64-abi, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:36 +0000 (10:47 -0500)]
Rollup merge of #101939 - zhaixiaojuan:loongarch64-abi, r=oli-obk

Add loongarch64 abi support

20 months agobroken links go brrrrr
Boxy [Thu, 10 Nov 2022 14:57:18 +0000 (14:57 +0000)]
broken links go brrrrr

20 months agoAuto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errors
bors [Thu, 10 Nov 2022 13:04:51 +0000 (13:04 +0000)]
Auto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errors

Rollup of 9 pull requests

Successful merges:

 - #102763 (Some diagnostic-related nits)
 - #103443 (Parser: Recover from using colon as path separator in imports)
 - #103675 (remove redundent "<>" for ty::Slice with reference type)
 - #104046 (bootstrap: add support for running Miri on a file)
 - #104115 (Migrate crate-search element to CSS variables)
 - #104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame)
 - #104201 (Add check in GUI test for file loading failure)
 - #104211 (:arrow_up: rust-analyzer)
 - #104231 (Update mailmap)

Failed merges:

 - #104169 (Migrate `:target` rules to use CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #104231 - ibraheemdev:patch-12, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:38 +0000 (21:53 -0800)]
Rollup merge of #104231 - ibraheemdev:patch-12, r=compiler-errors

Update mailmap

20 months agoRollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicola
Michael Goulet [Thu, 10 Nov 2022 05:53:38 +0000 (21:53 -0800)]
Rollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

20 months agoRollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddle
Michael Goulet [Thu, 10 Nov 2022 05:53:37 +0000 (21:53 -0800)]
Rollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddle

Add check in GUI test for file loading failure

Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again.

The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case.

cc ```@jsha```
r? ```@notriddle```

20 months agoRollup merge of #104190 - Nilstrieb:patch-1, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:37 +0000 (21:53 -0800)]
Rollup merge of #104190 - Nilstrieb:patch-1, r=compiler-errors

Ignore "Change InferCtxtBuilder from enter to build" in git blame

Because it changed the indentation of many things, this commit caused a lot of diff with no functional changes, so we should ignore it.

r? ```@compiler-errors``` as you've complained about this before

The relevant commit: https://github.com/rust-lang/rust/commit/283abbf0e7d20176f76006825b5c52e9a4234e4c

20 months agoRollup merge of #104115 - GuillaumeGomez:migrate-crate-search-div, r=notriddle
Michael Goulet [Thu, 10 Nov 2022 05:53:36 +0000 (21:53 -0800)]
Rollup merge of #104115 - GuillaumeGomez:migrate-crate-search-div, r=notriddle

Migrate crate-search element to CSS variables

There should no UI changes.

r? ```@notriddle```

20 months agoRollup merge of #104046 - RalfJung:run-miri-run, r=oli-obk
Michael Goulet [Thu, 10 Nov 2022 05:53:35 +0000 (21:53 -0800)]
Rollup merge of #104046 - RalfJung:run-miri-run, r=oli-obk

bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes https://github.com/rust-lang/rust/issues/76666

20 months agoRollup merge of #103675 - lyming2007:issue-103271-fix, r=fee1-dead
Michael Goulet [Thu, 10 Nov 2022 05:53:35 +0000 (21:53 -0800)]
Rollup merge of #103675 - lyming2007:issue-103271-fix, r=fee1-dead

remove redundent "<>" for ty::Slice with reference type

this fix #103271

20 months agoRollup merge of #103443 - mucinoab:recover-colon-as-path-separetor, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:34 +0000 (21:53 -0800)]
Rollup merge of #103443 - mucinoab:recover-colon-as-path-separetor, r=compiler-errors

Parser: Recover from using colon as path separator in imports

I don't know if this is the right approach, any feedback is welcome.

r? ```@compiler-errors```

Fixes #103269

20 months agoRollup merge of #102763 - compiler-errors:nits, r=cjgillot
Michael Goulet [Thu, 10 Nov 2022 05:53:34 +0000 (21:53 -0800)]
Rollup merge of #102763 - compiler-errors:nits, r=cjgillot

Some diagnostic-related nits

1. Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>`
2. Make `diag.span_suggestions` take an `IntoIterator` instead of `Iterator`, just to remove some `.into_iter` calls on the caller.

idk if I should add a lint to make sure people use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>` in cases where we're just, e.g., adding subdiagnostics to the diagnostic... maybe a followup.

20 months agoUse const_error_with_guaranteed more
Michael Goulet [Thu, 10 Nov 2022 05:39:06 +0000 (05:39 +0000)]
Use const_error_with_guaranteed more

20 months agoAuto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco
bors [Thu, 10 Nov 2022 05:19:10 +0000 (05:19 +0000)]
Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco

Recover from common if let syntax mistakes/typos

Fixes #103587

20 months agoDon't ICE when encountering ConstKind::Error in RequiredConstsVisitor
Michael Goulet [Thu, 10 Nov 2022 05:12:53 +0000 (05:12 +0000)]
Don't ICE when encountering ConstKind::Error in RequiredConstsVisitor

20 months agoupdate mailmap
Ibraheem Ahmed [Thu, 10 Nov 2022 04:40:06 +0000 (23:40 -0500)]
update mailmap

20 months agobless a chalk test
Michael Goulet [Thu, 10 Nov 2022 04:36:45 +0000 (04:36 +0000)]
bless a chalk test

20 months agoUse TraitEngine in more places, make FulfillmentCtxt constructor more private
Michael Goulet [Wed, 2 Nov 2022 00:54:36 +0000 (00:54 +0000)]
Use TraitEngine in more places, make FulfillmentCtxt constructor more private