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

Built-in derive macros Encodable, Decodable, RustcEncodable and RustcDecodable are stable #62048

Closed
petrochenkov opened this issue Jun 22, 2019 · 7 comments · Fixed by #62507
Closed
Assignees
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

The macros produce paths like serialize::foo or rustc_serialize::foo and I suspect that the feature gating was supposed to happen when you write extern crate serialize to bring that serialize into scope.

However, you can easily write use anything as serialize, and rustc_serialize is a stable crate on crates.io, so this kind of feature gating doesn't work.

After #62042 lands we should try to un-stabilize them and test it with crater.

@jonas-schievink jonas-schievink added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed I-nominated labels Jun 22, 2019
@petrochenkov
Copy link
Contributor Author

The bench attribute macro is also stable.

@pnkfelix
Copy link
Member

pre-triage: P-medium. removing nomination.

@petrochenkov : do you want to be assigned to this? Or are you just sending out a general alert, but do not plan to fix it?

@pnkfelix pnkfelix added P-medium Medium priority and removed I-nominated labels Jun 27, 2019
@petrochenkov
Copy link
Contributor Author

@pnkfelix
I can make a PR for crater once #62042 lands.

@petrochenkov petrochenkov self-assigned this Jul 8, 2019
bors added a commit that referenced this issue Jul 8, 2019
[WIP] Feature gate `(Rustc){En,De}codable` and `bench` for crater run

cc #62048
r? @ghost
@petrochenkov
Copy link
Contributor Author

PR for crater - #62507.

Centril added a commit to Centril/rust that referenced this issue Jul 29, 2019
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`

`Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time.
`#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`.

Crater results can be found in rust-lang#62507 (comment) and below.

This PR also reroutes the tracking issue for `feature(test)` from rust-lang#27812 (compiler internals) to rust-lang#50297 (custom test frameworks).

Closes rust-lang#62048
bors added a commit that referenced this issue Aug 1, 2019
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`

`Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time.
`#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`.

Crater results can be found in #62507 (comment) and below.

This PR also reroutes the tracking issue for `feature(test)` from #27812 (compiler internals) to #50297 (custom test frameworks).

Closes #62048
@mham613
Copy link

mham613 commented Nov 28, 2024

// core::prelude

pub mod rust_2024 {
pub use super::rust_2021::*;
pub use crate::future::{Future, IntoFuture};
}

@mham613
Copy link

mham613 commented Nov 28, 2024

use std::io;

fn main() {
println!("Guess the number!");

println!("Please input your guess.");

let mut guess = String::new();

io::stdin()
    .read_line(&mut guess)
    .expect("Failed to read line");

println!("You guessed: {}", guess);

}

@mham613
Copy link

mham613 commented Nov 28, 2024

// core::prelude

pub mod rust_2024 {
pub use super::rust_2021::*;
pub use crate::future::{Future, IntoFuture};
}
use std::io;

fn main() {
println!("Guess the number!");

println!("Please input your guess.");

let mut guess = String::new();

io::stdin()
    .read_line(&mut guess)
    .expect("Failed to read line");

println!("You guessed: {}", guess);

}[workspace]
members = ["member1", "member2"]

[workspace.metadata.webcontents]
root = "path/to/webproject"
tool = ["npm", "run", "build"]

...

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.const {auth, Compute} = require('google-auth-library');

async function main() {
const client = new Compute({
// Specifying the service account email is optional.
serviceAccountEmail: 'my-service-account@example.com'
});
const projectId = await auth.getProjectId();
const url = https://dns.googleapis.com/dns/v1/projects/${projectId};
const res = await client.request({url});
console.log(res.data);
}

main().catch(console.error);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-stability Area: `#[stable]`, `#[unstable]` etc. C-bug Category: This is a bug. P-medium Medium priority 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.

5 participants