summaryrefslogtreecommitdiff
path: root/bindgen/lib.rs
diff options
context:
space:
mode:
authorChristian Poveda Ruiz <31802960+pvdrz@users.noreply.github.com>2022-11-22 12:31:14 -0500
committerGitHub <noreply@github.com>2022-11-22 12:31:14 -0500
commit7e4174990c68bcc56314a31774639d88b2dbc692 (patch)
tree3179c7d46aa43f4e4c1735b6f572369d94c23004 /bindgen/lib.rs
parent046d6f9eea1803253c06dd99a0d38f5dcb5ed9c1 (diff)
Deprecate Rust targets lower or equal than `1.30` (#2356)
Diffstat (limited to 'bindgen/lib.rs')
-rw-r--r--bindgen/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/bindgen/lib.rs b/bindgen/lib.rs
index 53bbd887..4b71fb97 100644
--- a/bindgen/lib.rs
+++ b/bindgen/lib.rs
@@ -731,6 +731,13 @@ impl Builder {
///
/// The default is the latest stable Rust version
pub fn rust_target(mut self, rust_target: RustTarget) -> Self {
+ #[allow(deprecated)]
+ if rust_target <= RustTarget::Stable_1_30 {
+ warn!(
+ "The {} rust target is deprecated. If you have a good reason to use this target please report it at https://github.com/rust-lang/rust-bindgen/issues",
+ String::from(rust_target)
+ );
+ }
self.options.set_rust_target(rust_target);
self
}