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

Deprecate the url crate. #16076

Merged
merged 1 commit into from
Jul 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/liburl/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! Types/fns concerning URLs (see RFC 3986)

#![crate_name = "url"]
#![experimental]
#![deprecated="This is being removed. Use rust-url instead. http://servo.github.io/rust-url/"]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![license = "MIT/ASL2"]
Expand All @@ -35,6 +35,7 @@ use std::path::BytesContainer;
/// # Example
///
/// ```rust
/// # #![allow(deprecated)]
/// use url::Url;
///
/// let raw = "https://username@example.com:8080/foo/bar?baz=qux#quz";
Expand Down Expand Up @@ -214,6 +215,7 @@ fn encode_inner<T: BytesContainer>(c: T, full_url: bool) -> String {
/// # Example
///
/// ```rust
/// # #![allow(deprecated)]
/// use url::encode;
///
/// let url = encode("https://example.com/Rust (programming language)");
Expand Down Expand Up @@ -241,6 +243,7 @@ pub type DecodeResult<T> = Result<T, String>;
/// # Example
///
/// ```rust
/// # #![allow(deprecated)]
/// use url::decode;
///
/// let url = decode("https://example.com/Rust%20(programming%20language)");
Expand Down Expand Up @@ -428,6 +431,7 @@ fn query_from_str(rawquery: &str) -> DecodeResult<Query> {
/// # Example
///
/// ```rust
/// # #![allow(deprecated)]
/// let query = vec![("title".to_string(), "The Village".to_string()),
/// ("north".to_string(), "52.91".to_string()),
/// ("west".to_string(), "4.10".to_string())];
Expand All @@ -453,6 +457,7 @@ pub fn query_to_str(query: &Query) -> String {
/// # Example
///
/// ```rust
/// # #![allow(deprecated)]
/// use url::get_scheme;
///
/// let scheme = match get_scheme("https://example.com/") {
Expand Down
20 changes: 20 additions & 0 deletions src/test/compile-fail/deprecated-url.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-tidy-linelength

#![deny(deprecated)]

extern crate url;

fn main() {
let _ = url::Url::parse("http://example.com");
//~^ ERROR use of deprecated item: This is being removed. Use rust-url instead. http://servo.github.io/rust-url/
}