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

debug!("Received request: {:#?}", hyp_req); #2662

Closed
zlei9 opened this issue Dec 5, 2023 · 4 comments
Closed

debug!("Received request: {:#?}", hyp_req); #2662

zlei9 opened this issue Dec 5, 2023 · 4 comments
Labels
no bug The reported bug was confirmed nonexistent

Comments

@zlei9
Copy link

zlei9 commented Dec 5, 2023

I‘m run the sample of hello on v0,5, it shows:

warning: an associated function with this name may be added to the standard library in the future
  --> D:\rust\Rocket\core\lib\src\server.rs:76:5
   |
76 |     debug!("Received request: {:#?}", hyp_req);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior!
   = note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
   = help: call with fully qualified syntax `new(...)` to keep using the current method
   = note: `#[warn(unstable_name_collisions)]` on by default
   = note: this warning originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this function takes 1 argument but 0 arguments were supplied
  --> D:\rust\Rocket\core\lib\src\server.rs:76:5
   |
76 |     debug!("Received request: {:#?}", hyp_req);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an argument of type `UnsafeArg` is missing
   |
note: associated function defined here
  --> C:\Users\ZLEI\.cargo\registry\src\github.com-1ecc6299db9ec823\yansi-1.0.0-rc.1\src\paint.rs:56:8
   |
56 |     fn new(self) -> Painted<Self> where Self: Sized {
   |        ^^^
   = note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: provide the argument
  --> C:\Users\ZLEI\.cargo\registry\src\github.com-1ecc6299db9ec823\log-0.4.20\src\macros.rs:51:62
   |
51 |                 $crate::__private_api::format_args!($($arg)+)(/* UnsafeArg */),
   |                                                              +++++++++++++++++

error[E0308]: mismatched types
  --> D:\rust\Rocket\core\lib\src\server.rs:76:5
   |
76 |     debug!("Received request: {:#?}", hyp_req);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `UnsafeArg`, found struct `Painted`
   |
   = note: expected struct `UnsafeArg`
              found struct `Painted<UnsafeArg>`
   = note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: an associated function with this name may be added to the standard library in the future
   --> D:\rust\Rocket\core\lib\src\server.rs:163:9
    |
163 |         debug!("sending response: {:#?}", hyp_response);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior!
    = note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919>
    = help: call with fully qualified syntax `new(...)` to keep using the current method
    = note: this warning originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> D:\rust\Rocket\core\lib\src\server.rs:163:9
    |
163 |         debug!("sending response: {:#?}", hyp_response);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an argument of type `UnsafeArg` is missing
    |
note: associated function defined here
   --> C:\Users\ZLEI\.cargo\registry\src\github.com-1ecc6299db9ec823\yansi-1.0.0-rc.1\src\paint.rs:56:8
    |
56  |     fn new(self) -> Painted<Self> where Self: Sized {
    |        ^^^
    = note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: provide the argument
   --> |C:\Users\ZLEI\.cargo\registry\src\github.com-1ecc6299db9ec823\log-0.4.20\src\macros.rs:51:62
    |
51  |                 $crate::__private_api::format_args!($($arg)+)(/* UnsafeArg */),
    |                                                              +++++++++++++++++

error[E0308]: mismatched types
   --> D:\rust\Rocket\core\lib\src\server.rs:163:9
    |
163 |         debug!("sending response: {:#?}", hyp_response);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `UnsafeArg`, found struct `Painted`
    |
    = note: expected struct `UnsafeArg`
               found struct `Painted<UnsafeArg>`
    = note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0061, E0308.
For more information about an error, try `rustc --explain E0061`.
warning: `rocket` (lib) generated 2 warnings
error: could not compile `rocket` due to 4 previous errors; 2 warnings emitted
@zlei9 zlei9 added the triage A bug report being investigated label Dec 5, 2023
@SergioBenitez
Copy link
Member

SergioBenitez commented Dec 5, 2023

Can you provide all of the information requested by the issue template?

In particular, your compiler version. I believe this is some sort of bug in some rustc. Updating your compiler will probably resolve it.

@SergioBenitez
Copy link
Member

The CI also confirms that this is not an issue on any of the recent stable or nightly releases. Closing.

@SergioBenitez SergioBenitez closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
@SergioBenitez SergioBenitez added no bug The reported bug was confirmed nonexistent and removed triage A bug report being investigated labels Dec 6, 2023
@LanderN
Copy link

LanderN commented Dec 7, 2023

I have the same issue trying to compile an application using rocket in a buildroot package (for embedded linux). We're currently on buildroot 2023.02.7, which ships rust 1.67.1 (see https://github.com/buildroot/buildroot/blob/2023.02.8/package/rust-bin/rust-bin.mk). In this context it is not always trivial to bump rustc.

@SergioBenitez
Copy link
Member

SergioBenitez commented Dec 7, 2023

I'll see if there's something we can do to circumvent the rustc issue. In any case, this would be a change in figment, not Rocket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no bug The reported bug was confirmed nonexistent
Projects
None yet
Development

No branches or pull requests

3 participants