mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #21195 - servo:rustup, r=nox
Upgrade to rustc 1.29.0-nightly (1ecf6929d 2018-07-16) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21195) <!-- Reviewable:end -->
This commit is contained in:
commit
c45192614c
8 changed files with 27 additions and 36 deletions
|
@ -28,8 +28,8 @@ url = "1.2"
|
|||
env_logger = "0.5"
|
||||
embedder_traits = { path = "../embedder_traits", features = ["tests"] }
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))'.dependencies]
|
||||
xdg = "2.0"
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
dirs = "1.0"
|
||||
|
||||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
android_injected_glue = "0.2"
|
||||
|
|
|
@ -8,18 +8,16 @@
|
|||
|
||||
#[cfg(target_os = "android")]
|
||||
use android_injected_glue;
|
||||
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
||||
use std::env;
|
||||
#[cfg(target_os = "android")]
|
||||
use std::ffi::CStr;
|
||||
use std::path::PathBuf;
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
|
||||
use xdg;
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
|
||||
pub fn default_config_dir() -> PathBuf {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
|
||||
xdg_dirs.get_config_home()
|
||||
let mut config_dir = ::dirs::config_dir().unwrap();
|
||||
config_dir.push("servo");
|
||||
config_dir.push("default");
|
||||
config_dir
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
|
@ -33,24 +31,16 @@ pub fn default_config_dir() -> PathBuf {
|
|||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn default_config_dir() -> PathBuf {
|
||||
let mut config_dir = env::home_dir().unwrap();
|
||||
config_dir.push("Library");
|
||||
config_dir.push("Application Support");
|
||||
// FIXME: use `config_dir()` ($HOME/Library/Preferences)
|
||||
// instead of `data_dir()` ($HOME/Library/Application Support) ?
|
||||
let mut config_dir = ::dirs::data_dir().unwrap();
|
||||
config_dir.push("Servo");
|
||||
config_dir
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn default_config_dir() -> PathBuf {
|
||||
let mut config_dir = match env::var_os("APPDATA") {
|
||||
Some(appdata_path) => PathBuf::from(appdata_path),
|
||||
None => {
|
||||
let mut dir = env::home_dir().unwrap();
|
||||
dir.push("Appdata");
|
||||
dir.push("Roaming");
|
||||
dir
|
||||
}
|
||||
};
|
||||
let mut config_dir = ::dirs::config_dir().unwrap();
|
||||
config_dir.push("Servo");
|
||||
config_dir
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#[cfg(target_os = "android")]
|
||||
extern crate android_injected_glue;
|
||||
#[cfg(not(target_os = "android"))]
|
||||
extern crate dirs;
|
||||
extern crate embedder_traits;
|
||||
extern crate euclid;
|
||||
extern crate getopts;
|
||||
|
@ -17,8 +19,6 @@ extern crate rustc_serialize;
|
|||
extern crate servo_geometry;
|
||||
extern crate servo_url;
|
||||
extern crate url;
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))]
|
||||
extern crate xdg;
|
||||
|
||||
pub mod basedir;
|
||||
#[allow(unsafe_code)] pub mod opts;
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(proc_macro)]
|
||||
#![feature(proc_macro_non_items)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#![feature(const_fn)]
|
||||
#![feature(mpsc_select)]
|
||||
#![feature(plugin)]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(string_retain)]
|
||||
#![feature(use_extern_macros)]
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![allow(non_snake_case)]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use rustc::hir;
|
||||
use rustc::hir::{self, ExprKind};
|
||||
use rustc::hir::intravisit as visit;
|
||||
use rustc::hir::map as ast_map;
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
|
||||
|
@ -185,7 +185,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
|||
|
||||
match expr.node {
|
||||
// Trait casts from #[must_root] types are not allowed
|
||||
hir::ExprCast(ref subexpr, _) => require_rooted(cx, self.in_new_function, &*subexpr),
|
||||
ExprKind::Cast(ref subexpr, _) => require_rooted(cx, self.in_new_function, &*subexpr),
|
||||
// This catches assignments... the main point of this would be to catch mutable
|
||||
// references to `JS<T>`.
|
||||
// FIXME: Enable this? Triggers on certain kinds of uses of DomRefCell.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue