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

[E0635] Use of Unknown feature. #2513

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gcc/rust/checks/errors/rust-feature-gate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ FeatureGate::check (AST::Crate &crate)
}

else
rust_error_at (item->get_locus (), "unknown feature '%s'",
name_str.c_str ());
rust_error_at (item->get_locus (), ErrorCode::E0635,
"unknown feature %qs", name_str.c_str ());
MahadMuhammad marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions gcc/testsuite/rust/compile/feature.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![feature(AA)] //{ dg-error "unknown feature 'AA'" }

// ErrorCode - E0635
#![feature(AA)] //{ dg-error "unknown feature .AA." }
#![feature(iamcrabby)] // { dg-error "unknown feature .iamcrabby." }
#![feature(nonexistent_gccrs_feature)] // { dg-error "unknown feature .nonexistent_gccrs_feature." }

fn main(){}
fn main() {}
Loading