mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Linter changes
This commit is contained in:
parent
ac380df8b0
commit
907d9f23cf
9 changed files with 1 additions and 14 deletions
|
@ -29,7 +29,7 @@ B := $(CFG_BUILD_DIR)
|
|||
|
||||
MKFILE_DEPS := config.stamp $(call rwildcard,$(S)mk/,*)
|
||||
|
||||
CFG_RUSTC_FLAGS := $(RUSTFLAGS) -A default_methods
|
||||
CFG_RUSTC_FLAGS := $(RUSTFLAGS)
|
||||
|
||||
ifdef CFG_DISABLE_OPTIMIZE
|
||||
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
||||
|
|
|
@ -34,7 +34,6 @@ pub trait FontContextHandleMethods {
|
|||
fn create_font_from_identifier(&self, ~str, UsedFontStyle) -> Result<FontHandle, ()>;
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
pub struct FontContext {
|
||||
instance_cache: LRUCache<FontDescriptor, @mut Font>,
|
||||
font_list: Option<FontList>, // only needed by layout
|
||||
|
@ -45,7 +44,6 @@ pub struct FontContext {
|
|||
profiler_chan: ProfilerChan,
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
impl<'self> FontContext {
|
||||
pub fn new(backend: BackendType,
|
||||
needs_font_list: bool,
|
||||
|
|
|
@ -23,7 +23,6 @@ pub struct Opts {
|
|||
output_file: Option<~str>,
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
pub fn from_cmdline_args(args: &[~str]) -> Opts {
|
||||
use extra::getopts;
|
||||
|
||||
|
|
|
@ -171,7 +171,6 @@ enum AfterPrefetch {
|
|||
DoNotDecode
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
impl ImageCache {
|
||||
pub fn run(&mut self) {
|
||||
let mut msg_handlers: ~[~fn(msg: &Msg)] = ~[];
|
||||
|
|
|
@ -40,7 +40,6 @@ priv struct ImageState {
|
|||
last_response: ImageResponseMsg
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)] // Using maps of Urls
|
||||
impl LocalImageCache {
|
||||
/// The local cache will only do a single remote request for a given
|
||||
/// URL in each 'round'. Layout should call this each time it begins
|
||||
|
|
|
@ -211,7 +211,6 @@ extern fn setAttribute(cx: *JSContext, argc: c_uint, vp: *JSVal) -> JSBool {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
extern fn HTMLImageElement_getWidth(cx: *JSContext, _argc: c_uint, vp: *mut JSVal) -> JSBool {
|
||||
unsafe {
|
||||
let obj = JS_THIS_OBJECT(cx, cast::transmute(vp));
|
||||
|
@ -241,7 +240,6 @@ extern fn HTMLImageElement_getWidth(cx: *JSContext, _argc: c_uint, vp: *mut JSVa
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
extern fn HTMLImageElement_setWidth(cx: *JSContext, _argc: c_uint, vp: *mut JSVal) -> JSBool {
|
||||
unsafe {
|
||||
let obj = JS_THIS_OBJECT(cx, cast::transmute(vp));
|
||||
|
|
|
@ -97,7 +97,6 @@ macro_rules! generate_element(
|
|||
})
|
||||
)
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject {
|
||||
match node.type_id() {
|
||||
ElementNodeTypeId(HTMLElementTypeId) => generate_element!(HTMLElement),
|
||||
|
@ -138,7 +137,6 @@ pub unsafe fn unwrap(obj: *JSObject) -> AbstractNode<ScriptView> {
|
|||
AbstractNode::from_raw(raw)
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
extern fn getFirstChild(cx: *JSContext, _argc: c_uint, vp: *mut JSVal) -> JSBool {
|
||||
unsafe {
|
||||
let obj = JS_THIS_OBJECT(cx, cast::transmute(vp));
|
||||
|
@ -160,7 +158,6 @@ extern fn getFirstChild(cx: *JSContext, _argc: c_uint, vp: *mut JSVal) -> JSBool
|
|||
return 1;
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
extern fn getNextSibling(cx: *JSContext, _argc: c_uint, vp: *mut JSVal) -> JSBool {
|
||||
unsafe {
|
||||
let obj = JS_THIS_OBJECT(cx, cast::transmute(vp));
|
||||
|
|
|
@ -273,7 +273,6 @@ fn build_element_from_tag(cx: *JSContext, tag: &str) -> AbstractNode<ScriptView>
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
pub fn parse_html(cx: *JSContext,
|
||||
url: Url,
|
||||
resource_task: ResourceTask,
|
||||
|
@ -475,7 +474,6 @@ pub fn parse_html(cx: *JSContext,
|
|||
},
|
||||
complete_script: |script| {
|
||||
// A little function for holding this lint attr
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
fn complete_script(script: hubbub::NodeDataPtr,
|
||||
url: Url,
|
||||
js_chan: SharedChan<JSMessage>) {
|
||||
|
|
|
@ -17,7 +17,6 @@ Create a URL object from a string. Does various helpful browsery things like
|
|||
is based off the current url
|
||||
|
||||
*/
|
||||
#[allow(non_implicitly_copyable_typarams)]
|
||||
pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
|
||||
let schm = url::get_scheme(str_url);
|
||||
let str_url = if result::is_err(&schm) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue