Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

not clear what "base expression" is #106890

Closed
matthiaskrgr opened this issue Jan 14, 2023 · 0 comments · Fixed by #106893
Closed

not clear what "base expression" is #106890

matthiaskrgr opened this issue Jan 14, 2023 · 0 comments · Fixed by #106893
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

struct Struct<S, T> {
    a: S,
    b: T,
}

fn main() {
    Struct { .. };
}

Current output

error: base expression required after `..`
 --> src/lib.rs:7:16
  |
7 |     Struct { .. };
  |                ^ add a base expression here

Desired output

No response

Rationale and extra context

rustc does not explain what it actually mean with "base expression".
Unfortunately there also is no error number so we can't look this up with --explain

Other cases

No response

Anything else?

No response

@matthiaskrgr matthiaskrgr 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. D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. labels Jan 14, 2023
@bors bors closed this as completed in 33f27d3 Jan 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 10, 2024
Rollup merge of rust-lang#106893 - clubby789:struct-update-help, r=compiler-errors

Explain base expression for struct update syntax

Fixes rust-lang#106890

`@rustbot` label +A-diagnostics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-newcomer-roadblock Diagnostics: Confusing error or lint; hard to understand for new users. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant