Skip to content

rust-1.77_beta bootstrap is broken with: error[E0658]: c".." literals are experimental in library/std/src/sys/pal/unix/ #120810

Description

@stefson

hello everyone,

I got this error when I bootstrap the current rust-beta branch:

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/mod.rs:74:35
   |
74 |         thread::Thread::set_name(&c"main");
   |                                   ^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/mod.rs:126:27
    |
126 |                 if open64(c"/dev/null".as_ptr().cast(), libc::O_RDWR, 0) == -1 {
    |                           ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/mod.rs:156:31
    |
156 |                     if open64(c"/dev/null".as_ptr().cast(), libc::O_RDWR, 0) == -1 {
    |                               ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:249:53
    |
249 |             let process_info_sel = sel_registerName(c"processInfo".as_ptr());
    |                                                     ^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:250:50
    |
250 |             let arguments_sel = sel_registerName(c"arguments".as_ptr());
    |                                                  ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:251:46
    |
251 |             let count_sel = sel_registerName(c"count".as_ptr());
    |                                              ^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:252:56
    |
252 |             let object_at_index_sel = sel_registerName(c"objectAtIndex:".as_ptr());
    |                                                        ^^^^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:253:51
    |
253 |             let utf8string_sel = sel_registerName(c"UTF8String".as_ptr());
    |                                                   ^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:255:39
    |
255 |             let klass = objc_getClass(c"NSProcessInfo".as_ptr());
    |                                       ^^^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
    --> library/std/src/sys/pal/unix/fs.rs:1143:17
     |
1143 |                 c"".as_ptr() as *const c_char,
     |                 ^^^
     |
     = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
     = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:27:33
   |
27 |         const DEV_NULL: &CStr = c"null:";
   |                                 ^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:29:33
   |
29 |         const DEV_NULL: &CStr = c"/null";
   |                                 ^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:31:33
   |
31 |         const DEV_NULL: &CStr = c"/dev/null";
   |                                 ^^^^^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/thread.rs:168:17
    |
168 |                 c"%s".as_ptr(),
    |                 ^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.

Did not run successfully: exit status: 1

There was a lot of pushing and reverting changesets relevant to the c literals stabilization, I tried to get an overview of what backport might be missing here, but I failed and am at a loss.

I am on linux x86_64, with musl as my libc, I doubt the later is causing the issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions