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

tests: add failing tests for type_changing_struct_update feature flag #86660

Closed

Conversation

kolharsam
Copy link

This PR adds failing tests for the feature flag type_changing_struct_update.

The requirement for the same can be found in the following comment: #86618 (comment)

Related Issue: #86618

Please keep in mind that PR: #86646 has to be merged before the merge of this PR.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2021
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    |
18  | macro_rules! declare_features {
    | ----------------------------- when calling this macro
...
671 |     (active, type_changing_struct_update, "1.55.0", Some(86618), None)
    |                                                                       ^ missing tokens in macro arguments
error[E0432]: unresolved import `crate::Features`
 --> compiler/rustc_feature/src/builtin_attrs.rs:6:13
  |
  |
6 | use crate::{Features, Stability};
  |             |
  |             no `Features` in the root
  |             help: a similar name exists in the module: `Feature`


error[E0432]: unresolved imports `active::Features`, `active::ACTIVE_FEATURES`
   --> compiler/rustc_feature/src/lib.rs:149:18
    |
149 | pub use active::{Features, ACTIVE_FEATURES, INCOMPATIBLE_FEATURES, INCOMPLETE_FEATURES};
    |                  ^^^^^^^^  ^^^^^^^^^^^^^^^ no `ACTIVE_FEATURES` in `active`
    |                  |
    |                  no `Features` in `active`
    |                  help: a similar name exists in the module: `Feature`
error[E0412]: cannot find type `Features` in this scope
  --> compiler/rustc_feature/src/active.rs:76:38
   |
   |
76 |     pub fn set(&self, features: &mut Features, span: Span) {
   |                                      ^^^^^^^^ help: a struct with a similar name exists: `Feature`
  ::: compiler/rustc_feature/src/lib.rs:48:1
   |
48 | pub struct Feature {
   | ------------------ similarly named struct `Feature` defined here
   | ------------------ similarly named struct `Feature` defined here

error: unused import: `to_nonzero`
 --> compiler/rustc_feature/src/active.rs:3:13
  |
3 | use super::{to_nonzero, Feature, State};
  |
  |
  = note: `-D unused-imports` implied by `-D warnings`
error: unused import: `rustc_span::edition::Edition`
 --> compiler/rustc_feature/src/active.rs:5:5
  |
5 | use rustc_span::edition::Edition;
5 | use rustc_span::edition::Edition;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unused macro definition
  --> compiler/rustc_feature/src/active.rs:9:1
   |
9  | / macro_rules! set {
10 | |     ($field: ident) => {{
11 | |         fn f(features: &mut Features, _: Span) {
12 | |             features.$field = true;
15 | |     }};
16 | | }
   | |_^
   |
   |
   = note: `-D unused-macros` implied by `-D warnings`
error: aborting due to 7 previous errors

Some errors have detailed explanations: E0412, E0432.
For more information about an error, try `rustc --explain E0412`.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `rustc_feature`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" " llvm max_level_info" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-p" "rustc-main" "-p" "rustc_codegen_ssa" "-p" "rustc_macros" "-p" "rustc_middle" "-p" "rustc_feature" "-p" "rustc_arena" "-p" "rustc_query_system" "-p" "rustc_type_ir" "-p" "rustc_hir" "-p" "rustc_symbol_mangling" "-p" "rustc_session" "-p" "rustc_lint_defs" "-p" "rustc_data_structures" "-p" "rustc_graphviz" "-p" "rustc_ast" "-p" "rustc_lexer" "-p" "rustc_errors" "-p" "rustc_serialize" "-p" "rustc_index" "-p" "rustc_fs_util" "-p" "rustc_apfloat" "-p" "rustc_incremental" "-p" "rustc_span" "-p" "rustc_attr" "-p" "rustc_ast_pretty" "-p" "rustc_target" "-p" "rustc_driver" "-p" "rustc_lint" "-p" "rustc_trait_selection" "-p" "rustc_infer" "-p" "rustc_parse_format" "-p" "rustc_error_codes" "-p" "rustc_mir" "-p" "coverage_test_macros" "-p" "rustc_metadata" "-p" "rustc_expand" "-p" "rustc_ast_passes" "-p" "rustc_mir_build" "-p" "rustc_hir_pretty" "-p" "rustc_parse" "-p" "rustc_save_analysis" "-p" "rustc_plugin_impl" "-p" "rustc_typeck" "-p" "rustc_ty_utils" "-p" "rustc_interface" "-p" "rustc_builtin_macros" "-p" "rustc_passes" "-p" "rustc_codegen_llvm" "-p" "rustc_llvm" "-p" "rustc_resolve" "-p" "rustc_ast_lowering" "-p" "rustc_traits" "-p" "rustc_query_impl" "-p" "rustc_privacy" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:01:47

@JohnTitor
Copy link
Member

Please keep in mind that PR: #86646 has to be merged before the merge of this PR.

I think it's better to include the commits here into that PR, not to separate PRs.

@davidtwco davidtwco added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2021
@davidtwco
Copy link
Member

I've marked this as waiting on author, we can change it back once #86646 lands.

@crlf0710 crlf0710 added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 17, 2021
@crlf0710 crlf0710 added the F-type-changing-struct-update `#![feature(type_changing_struct_update)]` label Oct 10, 2021
@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 14, 2021
@jackh726
Copy link
Member

Closing since #89730 has been merged and includes a similar test

@jackh726 jackh726 closed this Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-type-changing-struct-update `#![feature(type_changing_struct_update)]` S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

8 participants