Skip to content

Change error message for ty param in const #76719

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Sep 16, 2020

Conversation

hameerabbasi
Copy link
Contributor

@hameerabbasi hameerabbasi commented Sep 14, 2020

This PR introduces the following changes:

  • Change error message for type param in a const expression when using
    min_const_generics
  • Change ParamInNonTrivialAnonConst to contain an extra bool used for
    distinguishing whether the passed-in symbol is a type or a value.

Fixes #76701

@rust-highfive
Copy link
Contributor

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 14, 2020
@hameerabbasi
Copy link
Contributor Author

r? @lcnr

@rust-highfive rust-highfive assigned lcnr and unassigned davidtwco Sep 14, 2020
@hameerabbasi hameerabbasi marked this pull request as draft September 14, 2020 21:45
@jyn514 jyn514 added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 14, 2020
@jyn514 jyn514 added the A-const-generics Area: const generics (parameters and arguments) label Sep 14, 2020
* Change error message for type param in a const expression when using
min_const_generics
* Change ParamInNonTrivialAnonConst to contain an extra bool used for
distinguishing whether the passed-in symbol is a type or a value.
Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
@lcnr
Copy link
Contributor

lcnr commented Sep 15, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 15, 2020

📌 Commit 5f0b775 has been approved by lcnr

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2020
@hameerabbasi hameerabbasi marked this pull request as ready for review September 15, 2020 10:04
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2020
Rollup of 16 pull requests

Successful merges:

 - rust-lang#75026 (Add array_windows fn)
 - rust-lang#76642 (Do not lint ignored private doc tests)
 - rust-lang#76719 (Change error message for ty param in const)
 - rust-lang#76721 (Use intra-doc links in `core::mem`)
 - rust-lang#76728 (Add a comment why `extern crate` is necessary for rustdoc)
 - rust-lang#76735 (Remove unnecessary `clone()`s in bootstrap)
 - rust-lang#76741 (Avoid printing dry run timings)
 - rust-lang#76747 (Add missing code examples in libcore)
 - rust-lang#76756 (fix a couple of stylistic clippy warnings)
 - rust-lang#76758 ([fuchsia] Propagate the userspace UTC clock)
 - rust-lang#76759 (Fix stabilization marker for future_readiness_fns)
 - rust-lang#76760 (don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations))
 - rust-lang#76764 (Update books)
 - rust-lang#76775 (Strip a single leading tab when rendering dataflow diffs)
 - rust-lang#76778 (Simplify iter fuse struct doc)
 - rust-lang#76794 (Make graphviz font configurable)

Failed merges:

r? `@ghost`
@bors bors merged commit a63f8c1 into rust-lang:master Sep 16, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 16, 2020
@hameerabbasi hameerabbasi deleted the min-const-generics-ty branch September 17, 2020 06:12
@varkor varkor added the F-const_generics `#![feature(const_generics)]` label Oct 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints F-const_generics `#![feature(const_generics)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

min_const_generics: ty param in const incorrect help
8 participants